mattstyles / koa-socket

Sugar for connecting socket.io to a koa instance
242 stars 50 forks source link

General question: Why my socketio isn't working? #22

Closed chanlito closed 7 years ago

chanlito commented 7 years ago

`/* npm dependencies / import http from 'http' /* local dependencies / import app from './app' import io from './socket.io' import config from './config'

io.attach(app) const server = http.createServer(app.callback()) .listen(config.port, () => { console.log(Server running on port ${config.port}) })

export default server `

I'm trying to create the server without using the app.listen() provided by koa.