Skip to content
This repository has been archived by the owner on Apr 28, 2021. It is now read-only.

Latest commit

 

History

History
58 lines (36 loc) · 1.28 KB

hub.md

File metadata and controls

58 lines (36 loc) · 1.28 KB

Hub server of SUGOS

Functions

sugoHub() -> SugoHub

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))

SugoHub Class

Hub server of SUGOS

new SugoHub(options)

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.