Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Local server port shall be configurable.

  • Loading branch information...
commit f35808eb4e38a2211d85f52cd71c8e6ea63c8900 1 parent 9669650
@majek authored
Showing with 8 additions and 1 deletion.
  1. +4 −0 config_local.js
  2. +4 −1 server.js
View
4 config_local.js
@@ -4,3 +4,7 @@ exports.socketio = {
host: "127.0.0.1"
};
+exports.server = {
+ port: 8090
+};
+
View
5 server.js
@@ -7,6 +7,9 @@ var webjs = require('./webjs');
var endpoints = require('./endpoints');
var tickets = require('./tickets');
+var config = require('./config');
+// Config must provide:
+// config.server.port
var endpoint_path = [/[/]endpoints[/]([^/]*)[/]?$/, 'endpoint_name'];
@@ -27,4 +30,4 @@ $.extend(app, tickets.app);
var handler = webjs.handler(app, dispatcher);
-http.createServer(handler).listen(8090, "0.0.0.0");
+http.createServer(handler).listen(config.server.port, "0.0.0.0");
Please sign in to comment.
Something went wrong with that request. Please try again.