Answer the question
In order to leave comments, you need to log in
How to make Express routes on a server with socket.io?
Connected socket.io to Express base server.
const express = require('express')
const app = express()
const server = require('http').createServer(app)
const io = require('socket.io')(server)
io.on('connection', socket => {
...
})
server.listen(9090)
http
with Express and it is not entirely clear how I can now have regular routes in this configuration, likeserver.get('/hello')
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question