README
now-fts
The main benefit of now-fts
is that you just write TypeScript functions and can easily deploy robust serverless functions. No dealing with HTTP, parameter validation, or data encoding / decoding!
See the main docs for info on FTS in general.
Usage
Say we have the following FTS function:
// example.ts
export function example(name: string, foo: number): string {
return `${name}: ${foo}`
}
You can use the now-fts
builder to deploy it as an HTTP lambda with the following now.json
:
// now.json
{
"version": 2,
"builds": [{ "src": "example.ts", "use": "now-fts" }]
}
Then deploy the application via the now
command.
The resulting deployment will use an fts-http
handler to respond to HTTP requests by invoking the original example
function, without you having to deal with HTTP, server logic, parameter checking, or data encoding / decoding.
License
MIT © Saasify