Node.js based forum software built for the modern web
setting up config file for use in app, updated readme
Julian Lama2d727dd869a
diff --git a/.gitignore b/.gitignoreindex db2bf00d5a..771027916c 100644--- a/.gitignore+++ b/.gitignore@@ -5,4 +5,5 @@npm-debug.lognode_modules/!/node_modules/-!src/node_modules/\ No newline at end of file+!src/node_modules/+sftp-config.jsondiff --git a/README.md b/README.mdindex e0411f30d6..b84dbd8e4e 100644--- a/README.md+++ b/README.md@@ -1,6 +1,23 @@-Installation+# node-forum+**node-forum** is a robust nodejs driven forum built on a redis database.-1. npm install+## Installation-2. sudo node app+1. `$ npm install`+2. `node app`++## Config++node-forum is pre-configured to run on port 4567, with default options defined in config.json. The following options are available:++<table>+ <tr>+ <th>Option</th>+ <th>Description</th>+ </tr>+ <tr>+ <td><b>port</b></td>+ <td><i>(Default: 4567)</i> The default port that node-forum runs on</td>+ </tr>+</table>\ No newline at end of filediff --git a/config.js b/config.jsnew file mode 100644index 0000000000..5edb9eb8d1--- /dev/null+++ b/config.js@@ -0,0 +1,5 @@+var config = {+ "port": 4567+}++module.exports = config;\ No newline at end of filediff --git a/config.json b/config.jsondeleted file mode 100644index e69de29bb2..0000000000diff --git a/public/templates/header.tpl b/public/templates/header.tplindex c392fd2253..da6c1c2839 100644--- a/public/templates/header.tpl+++ b/public/templates/header.tpl@@ -113,7 +113,7 @@}</style><script>- var socket = io.connect('http://198.199.80.41:8081');+ var socket = io.connect('http://198.58.101.18:8081');socket.on('event:connect', function(data) {diff --git a/src/webserver.js b/src/webserver.jsindex 8c22b763e2..195af823a0 100644--- a/src/webserver.js+++ b/src/webserver.js@@ -1,13 +1,12 @@var express = require('express'),connect = require('connect'),+ config = require('../config.js'),WebServer = express();(function(app) {var templates = global.templates;--app.get('/test', function(req, res) {var body = 'testing';res.setHeader('Content-Type', 'text/html');@@ -46,7 +45,7 @@ var express = require('express'),});});- app.listen(80);+ app.listen(config.port);}}(WebServer));