Skip to content

Latest commit

 

History

History

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

README.md

TypeScript HTTP Hello World

This repository contains a Hello World HTTP WebAssembly component example, written in TypeScript.

This component:

  • Uses TypeScript for its implementation
  • Uses the wasi:http standard WIT definitions
  • Returns "hello from TypeScript" to all HTTP requests

Dependencies

![WARN] When building this project, ensure you are using a stable NodeJS release.

Use of node version management tools (ex. nvm or more newer NVM compatible tools like fnm) are recommended -- a .nvmrc file is included for easy use.

Building this project relies on the following software:

Name Description
wash Wasm Shell helps build, develop, and publish WebAssembly components
npm Node Package Manager (NPM) manages packages for the NodeJS ecosystem
node [NodeJS runtime][nodejs] (see .nvmrc for version)

Quickstart

To get started developing this project quickly, clone the repo and run wash dev in this directory:

wash dev

wash dev does many things for you:

  • Builds this project (including necessary npm script targets)
  • Runs the component locally, exposing the application at localhost:8000
  • Watches your code for changes and re-deploys when necessary.

Send a request to the running component

Once wash dev is serving your component, send a request to the running component:

curl localhost:8000

Adding Capabilities

To learn how to extend this example with additional capabilities, see the TypeScript Language Guide in the wasmCloud documentation.