mirror of
https://github.com/NodeBB/NodeBB.git
synced 2025-12-22 00:10:25 +01:00
setting up config file for use in app, updated readme
This commit is contained in:
3
.gitignore
vendored
3
.gitignore
vendored
@@ -5,4 +5,5 @@
|
|||||||
npm-debug.log
|
npm-debug.log
|
||||||
node_modules/
|
node_modules/
|
||||||
!/node_modules/
|
!/node_modules/
|
||||||
!src/node_modules/
|
!src/node_modules/
|
||||||
|
sftp-config.json
|
||||||
|
|||||||
23
README.md
23
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>
|
||||||
5
config.js
Normal file
5
config.js
Normal file
@@ -0,0 +1,5 @@
|
|||||||
|
var config = {
|
||||||
|
"port": 4567
|
||||||
|
}
|
||||||
|
|
||||||
|
module.exports = config;
|
||||||
@@ -113,7 +113,7 @@
|
|||||||
}
|
}
|
||||||
</style>
|
</style>
|
||||||
<script>
|
<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) {
|
socket.on('event:connect', function(data) {
|
||||||
|
|
||||||
|
|||||||
@@ -1,13 +1,12 @@
|
|||||||
var express = require('express'),
|
var express = require('express'),
|
||||||
connect = require('connect'),
|
connect = require('connect'),
|
||||||
|
config = require('../config.js'),
|
||||||
WebServer = express();
|
WebServer = express();
|
||||||
|
|
||||||
|
|
||||||
(function(app) {
|
(function(app) {
|
||||||
var templates = global.templates;
|
var templates = global.templates;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
app.get('/test', function(req, res) {
|
app.get('/test', function(req, res) {
|
||||||
var body = 'testing';
|
var body = 'testing';
|
||||||
res.setHeader('Content-Type', 'text/html');
|
res.setHeader('Content-Type', 'text/html');
|
||||||
@@ -46,7 +45,7 @@ var express = require('express'),
|
|||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
||||||
app.listen(80);
|
app.listen(config.port);
|
||||||
}
|
}
|
||||||
|
|
||||||
}(WebServer));
|
}(WebServer));
|
||||||
|
|||||||
Reference in New Issue
Block a user