sugo-demo-middleware
v1.0.10
Published
Demo of sugo middleware
Downloads
27
Readme
sugo-demo-middleware
Demo of sugo middleware
Requirements
Installation
$ npm install sugo-demo-middleware --save
Usage
Apply middleware to sg-server, which is internally use by sugo-cloud.
/** This is an example to use sugo-demo-middleware */
'use strict'
const sgServer = require('sg-server')
const server = sgServer({
middlewares: [
require('sugo-demo-middleware')({
// Options
})
],
endpoints: {
/* ... */
}
})
server.listen(3000)
Signature
sugoDemoMiddleware(options) -> function
Demo of sugo middleware
Args
| Name | Type | Default | Description | | --- | ---- | --- | --- | | options | object | | Optional settings. |
License
This software is released under the Apache-2.0 License.