Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings
This repository was archived by the owner on May 24, 2020. It is now read-only.

Commit c9d7c7d

Browse files
try to fix socket.io
1 parent d389d50 commit c9d7c7d

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

‎app.js‎

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,8 @@ var data = {
1010
};
1111

1212
var app = express();
13+
var server = http.createServer(app);
14+
var io = socketIO(server);
1315

1416
app.set('views', path.join(__dirname, 'views'));
1517
app.set('view engine', 'pug');
@@ -56,6 +58,4 @@ app.post('/update', (req, res) => {
5658
}
5759
});
5860

59-
app.listen(process.env.PORT || 5000);
60-
var server = http.Server(app);
61-
var io = socketIO(server);
61+
server.listen(process.env.PORT || 5000);

0 commit comments

Comments
(0)

AltStyle によって変換されたページ (->オリジナル) /