From 60afbf1d5247b974edd0c9926561057c398df563 Mon Sep 17 00:00:00 2001 From: Chris Blanchard Date: Thu, 23 Jul 2015 11:35:23 +0100 Subject: [PATCH] Randomise new users and shorten compile script --- config/socketio.js | 3 +-- package.json | 4 ++-- 2 files changed, 3 insertions(+), 4 deletions(-) diff --git a/config/socketio.js b/config/socketio.js index 490d500..a13c348 100644 --- a/config/socketio.js +++ b/config/socketio.js @@ -8,12 +8,11 @@ var gatherController = require("../lib/gather/controller"); var userController = require("../lib/user/controller"); module.exports = function (io) { - var id = 2131; - var rootNamespace = io.of('/') // Authorisation io.use(function (socket, next) { + var id = Math.floor(Math.random() * 5000) + 1; enslClient.getUserById({ id: id }, function (error, response, body) { diff --git a/package.json b/package.json index 32606a4..b7089cf 100644 --- a/package.json +++ b/package.json @@ -10,8 +10,8 @@ "scripts": { "test": "NODE_ENV=test mocha spec/", "start": "npm run compile:react && node index.js", - "compile:dev:react": "node_modules/react-tools/bin/jsx --watch --no-cache-dir --source-map-inline -x jsx lib/react/ public/js/", - "compile:react": "node_modules/react-tools/bin/jsx -x jsx lib/react/ public/js/", + "compile:dev": "node_modules/react-tools/bin/jsx --watch --no-cache-dir --source-map-inline -x jsx lib/react/ public/js/", + "compile": "node_modules/react-tools/bin/jsx -x jsx lib/react/ public/js/", "dev": "nodemon index.js" }, "repository": {