From 3684d590f51fae6dd9bb4501f7ea75afe20ffcda Mon Sep 17 00:00:00 2001 From: Stanley288 Date: Fri, 25 Aug 2017 22:44:25 -0700 Subject: [PATCH] [docs] Use path.join instead of concatenating paths (#3014) --- examples/chat/index.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/examples/chat/index.js b/examples/chat/index.js index c9efcec25e..a1355285c9 100644 --- a/examples/chat/index.js +++ b/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; @@ -10,7 +11,7 @@ server.listen(port, function () { }); // Routing -app.use(express.static(__dirname + '/public')); +app.use(express.static(path.join(__dirname, 'public'))); // Chatroom