@faasjs/server
TypeScript icon, indicating that this package has built-in type declarations

6.4.3 • Public • Published

@faasjs/server

FaasJS's server module.

License: MIT NPM Version

Install

# If you are using bun, tsx is not required.
npm install @faasjs/server tsx

Usage

  1. Create a server.ts file:
// server.ts
import { Server } from '@faasjs/server'

const server = new Server({
 // options
})

server.start()
  1. Run the server:
tsx server.ts // or `bun server.ts` if you are not using bun

Routing

Static routing:

  • / -> index.func.ts or index.func.tsx
  • /path -> path.func.ts or path.func.tsx or path/index.func.ts or path/index.func.tsx

Dynamic routing:

  • /* -> default.func.ts or default.func.tsx
  • /path/* -> path/default.func.ts or path/default.func.tsx

Functions

Classes

Type Aliases

Readme

Keywords

none

Package Sidebar

Install

npm i @faasjs/server

Weekly Downloads

81

Version

6.4.3

License

MIT

Unpacked Size

44.9 kB

Total Files

6

Last publish

Collaborators

  • zfben