У меня есть этот сокет.io:
var express = require('express');
var app = express();
let http = require('http').Server(app);
let io = require('socket.io')(http);
let http2 = require('http').Server(app);
let io2 = require('socket.io')(http2);
io.on('connect', function(socket) {
app.use(express.static(__dirname + '/one_dir'));
});
io2.on('connect', function(socket) {
app.use(express.static(__dirname + '/another_dir'));
});
http.listen(4000, function(){
console.log('check *:4000');
});
http2.listen(5000, function () {
console.log('& check *:5000');
});
Я новичок в node.js (и в сокете тоже), поэтому мне нужно, чтобы на 127.0.0.1:4000 был index.html из / one_dir , а на 127.0.0.1:5000 был index .html от / another_dir ,
Можете ли вы помочь мне решить эту проблему?