This repository contains a Hello World HTTP WebAssembly component example, written in TypeScript.
This component:
- Uses TypeScript for its implementation
- Uses the
wasi:httpstandard WIT definitions - Returns
"hello from TypeScript"to all HTTP requests
![WARN] When building this project, ensure you are using a stable NodeJS release.
Use of node version management tools (ex.
nvmor more newer NVM compatible tools likefnm) are recommended -- a.nvmrcfile 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) |
To get started developing this project quickly, clone the repo and run wash dev in this directory:
wash devwash dev does many things for you:
- Builds this project (including necessary
npmscript targets) - Runs the component locally, exposing the application at
localhost:8000 - Watches your code for changes and re-deploys when necessary.
Once wash dev is serving your component, send a request to the running component:
curl localhost:8000To learn how to extend this example with additional capabilities, see the TypeScript Language Guide in the wasmCloud documentation.