setting up config file for use in app, updated readme

v1.18.x
Julian Lam 12 years ago
parent efa0649081
commit a2d727dd86

3
.gitignore vendored

@ -5,4 +5,5 @@
npm-debug.log
node_modules/
!/node_modules/
!src/node_modules/
!src/node_modules/
sftp-config.json

@ -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>

@ -0,0 +1,5 @@
var config = {
"port": 4567
}
module.exports = config;

@ -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) {

@ -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));

Loading…
Cancel
Save