Runkit
Runkit
home page
user forum
new notebook
clone notebook
download notebook
support & documentation
log in
sign up
new notebook
help & feedback
clone this notebook
download this notebook
Sign In
Sign Up
RunKit + npm: @hexlabs/http-api-ts
node v14.20.1
endpoint
share
tweet
var httpApiTs = require("@hexlabs/http-api-ts") const handler = httpApiTs.router([ httpApiTs.route('/hello', httpApiTs.HttpMethod.GET, async () => ({statusCode: 200, body: 'world'})) ]); // Call locally console.log(await handler({resource: '/hello', httpMethod: 'GET'}))
Created from: https://npm.runkit.com/%40hexlabs%2Fhttp-api-ts
Loading…
Clone and edit this document