Hub server of SUGOS
- Functions
SugoHub
Class
Create a hub instance. Just an alias of new SugoHub(config)
Example:
co(function * () {
let hub = sugoHub({
// Options here
})
yield hub.listen(3000)
}).catch((err) => console.error(err))
Hub server of SUGOS
Constructor of SugoHub class
Param | Type | Description |
---|---|---|
options | Object | Optional settings |
options.storage | string,Object | Storage options |
config.keys | string | Koa keys |
options.endpoints | Object | Endpoint settings |
config.context | Object | Koa context prototype |
config.public | string | Public directories. |
options.socketIoOptions | Object | Option object of Socket.IO constructor |
options.localActors | Object | Local actor instances |
options.logFile | string,boolean | File name to save logs. |