Skip to main content
Version: 1.x

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:

NameDescription
washWasm Shell helps build, develop, and publish WebAssembly components
npmNode Package Manager (NPM) manages packages for the NodeJS ecosystem
node[NodeJS runtime][nodejs] (see .nvmrc for version)

Quickstart

To get started developing this repository quickly, clone the repo and run wash dev:

console
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:

console
curl localhost:8000

Adding Capabilities

To learn how to extend this example with additional capabilities, see the Adding Capabilities section of the wasmCloud documentation.