kayser
TypeScript icon, indicating that this package has built-in type declarations

0.13.1 • Public • Published

Kayser

Async HTTP framework for Node

Installation

yarn add kayser

Or, if you prefer to use npm:

npm install --save kayser

Usage

In your package.json:

 {
 	"scripts": {
+		"start": "kayser"
 	}
 }

Basic usage

In your index.js (or the file in your main field in package.json):

module.exports = (req, res) => {
  return {
    message: 'hello world'
  }
}

With routes

const { router, get } = require('kayser/http')

const routes = new Map()

get(routes, '/', (req, res) => ({ body: 'root route' }))
get(routes, '/about', (req, res) => ({ body: 'about route' }))

module.exports = router(routes)

Configuration

TBD.

Readme

Keywords

none

Package Sidebar

Install

npm i kayser

Weekly Downloads

1

Version

0.13.1

License

MIT

Unpacked Size

32.1 kB

Total Files

29

Last publish

Collaborators

  • gabrielizaias