Skip to content

Node.js based forum software built for the modern web

changing socket.io to exist on the same port as the server, made config file template (removed config file from repo)

Julian Lam2d8725d52277
diff --git a/.gitignore b/.gitignore
index dac9b9918d..81ff636051 100644
--- a/.gitignore
+++ b/.gitignore
@@ -1,7 +1,8 @@
-#################
-## npm
-#################
-
-npm-debug.log
-node_modules/
-sftp-config.json
+#################
+## npm
+#################
+
+npm-debug.log
+node_modules/
+sftp-config.json
+public/config.json
diff --git a/public/config.default.json b/public/config.default.json
new file mode 100644
index 0000000000..b81885cda2
--- /dev/null
+++ b/public/config.default.json
@@ -0,0 +1,6 @@
+{
+ "socket" : {
+ "address" : "localhost",
+ "port" : "4567"
+ }
+}
\ No newline at end of file
diff --git a/public/config.json b/public/config.json
deleted file mode 100644
index e8f8030db9..0000000000
--- a/public/config.json
+++ /dev/null
@@ -1,6 +0,0 @@
-{
- "socket" : {
- "address" : "198.199.80.41",
- "port" : "8081"
- }
-}
\ No newline at end of file
diff --git a/src/webserver.js b/src/webserver.js
index 674fd98a29..dbbb65ff4f 100644
--- a/src/webserver.js
+++ b/src/webserver.js
@@ -44,3 +44,4 @@ var express = require('express'),
}(WebServer));
server.listen(config.port);
+global.server = server;
\ No newline at end of file
diff --git a/src/websockets.js b/src/websockets.js
index 6ed57f6edc..521f76702c 100644
--- a/src/websockets.js
+++ b/src/websockets.js
@@ -1,5 +1,5 @@
-var SocketIO = require('socket.io').listen(8081);
+var SocketIO = require('socket.io').listen(global.server);
(function(io) {