Closed ElegantScripting closed 8 years ago
I get this error upon running: "[0] Error: Invalid listen argument: [object Arguments]"
But my code looks totally fine:
import koa from "koa"; import koaStatic from "koa-static"; import koaSocket from "koa-socket"; try { const app = new koa(); const host = process.env.HOST || "localhost"; const port = process.env.PORT || 8000; app.use(koaStatic("dist")); var io = new koaSocket(); io.attach(app); app.listen(port, () => { console.info(`[Koa] Server is listening on http://${host}:${port}`); }); } catch (error) { console.error(error.stack || error); }
which version of koa-socket are you using?
koa-socket
There have been some changes around that area for v4.1
Just pushed up 4.2.1, I think that should solve the problem
confirmed working after 4.3.0 update
I get this error upon running: "[0] Error: Invalid listen argument: [object Arguments]"
But my code looks totally fine: