Skip to content
Snippets Groups Projects
Commit 5502d140 authored by Julien Raspaud's avatar Julien Raspaud
Browse files

Configurable host for socket

parent 915f0c63
No related branches found
No related tags found
No related merge requests found
module.exports = {
port: 5000,
host: 'localhost',
};
......@@ -2,7 +2,7 @@ import jsonToHtmlArray from './display';
import diffNodes from './diffNodes';
import { port } from './config';
const socketIO = io.connect(`http://localhost:${port || 3000}/`);
const socketIO = io.connect(`http://${host || 'localhost'}:${port || 3000}/`);
socketIO.on('connect', () => {
socketIO.emit('date');
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment