sg-server
HTTP server for SUGOS
Using koa as a base framework
Installation
$ npm install sg-server --save
Usage
'use strict' const sgServer = const co =
Signature
sgServer(config) -> http.Server
Create web server using koa
Arg | Type | Default | Description |
---|---|---|---|
config | object | Server configuration | |
config.middlewares | function[] | [] | Middlewares instance |
config.keys | string | Koa keys | |
config.context | Object | Koa context prototype | |
config.onError | function | Error handler | |
config.static | string | Public directories. | |
config.endpoints | Object | Endpoint settins |
License
This software is released under the Apache-2.0 License.