Skip to content

Commit

Permalink
[docs] Use path.join instead of concatenating paths (#3014)
Browse files Browse the repository at this point in the history
  • Loading branch information
Stanley288 authored and darrachequesne committed Aug 26, 2017
1 parent dd69abb commit 3684d59
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion examples/chat/index.js
@@ -1,6 +1,7 @@
// Setup basic express server
var express = require('express');
var app = express();
var path = require('path');
var server = require('http').createServer(app);
var io = require('../..')(server);
var port = process.env.PORT || 3000;
Expand All @@ -10,7 +11,7 @@ server.listen(port, function () {
});

// Routing
app.use(express.static(__dirname + '/public'));
app.use(express.static(path.join(__dirname, 'public')));

// Chatroom

Expand Down

0 comments on commit 3684d59

Please sign in to comment.