TypeError: Server.loadOptions is not a function
ertrzyiks opened this issue · comments
I've just installed logux-server@0.1.1
and wanted to use the snippet from the README
const Server = require('logux-server').Server
const app = new Server(
Server.loadOptions(process, {
subprotocol: '1.0.0',
supports: '1.x',
root: __dirname
})
)
app.auth((userId, token) => {
// TODO Check token and return a Promise with true or false.
})
app.listen()
It throws an error as in the title
TypeError: Server.loadOptions is not a function
Looks like the current master defines loadOptions
function on Server
, but the code from npm does not.
Hi. Sorry GitHub docs is about master
version of Logux.
I suggest you to use it:
”logux-server": "logux/logux-server"
Don't forget to use master
version for other Logux components.
Thanks, it works like a charm