异世界红茶馆的源码
You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
Julian Lam 1d78c6a35d removing debug statements from ajaxify
building in middle click and ctrl-click listeners for new tab opening
instructing git to ignore everything in the /uploads folder
12 years ago
install/data install scripts for categories and added new post badges to category listing 12 years ago
public removing debug statements from ajaxify 12 years ago
src removed old upload code 12 years ago
.gitignore still derping away on duhsign 12 years ago
.project log server errors in browser 12 years ago
README.md minor tweaks to config default, and text copy update on registration page 12 years ago
app.js moved user routes into routers/user.js 12 years ago
config.default.js minor tweaks to config default, and text copy update on registration page 12 years ago
nodebb Merge branch 'master' of github.com:psychobunny/node-forum 12 years ago
package.json interim commit 12 years ago

README.md

NodeBB

NodeBB is a robust nodejs driven forum built on a redis database. It is powered by web sockets, and is compatible down to IE8.

Installation

NodeBB is powered by Node.js with a Redis database. They must be installed prior in order for NodeBB to work. build-essential exposes the build environment for bcrypt compilation.

# apt-get install nodejs redis-server npm build-essential

Next, obtain all of the dependencies required by NodeBB:

$ npm install

Now we ensure that the configuration files are properly set up. NodeBB runs on port 4567 by default. The client side config can be set up thusly:

$ cp public/config.default.json public/config.json

... and the server side config can be set up similarly:

$ cp config.default.js config.js

Ensure that /public/config.json points to the publically accessible IP/hostname of your forum, and that the values of the server side config are also set correctly (see below).

Lastly, we run the forum.

$ node app

(Optional) Some server configurations may install the node binary as nodejs instead of node. You can re-map it (so as to not break compatibility with node-supervisor) by running the following command:

# update-alternatives --install /usr/bin/node node /usr/bin/nodejs 10

Server Configuration

The server configuration file (located at /config.js) contains default options required for the running of NodeBB. The following options are available:

Option Description
base_url (Default: 'http://localhost') A web-accessible URL to your app, without the port
upload_path (Default: '/public/uploads') A relative path (relative to the application's web root) to the uploads folder. Please ensure that Node.js can write to this folder
use_port (Default: true) Whether or not to include the port number when constructing the url for use in NodeBB. If you are serving NodeBB via a proxy (i.e. nginx), switch this off.
port (Default: 4567) The default port that NodeBB runs on. Even if you are running NodeBB behind a proxy server, this port must be set.
mailer (Default: {
    host: 'localhost',
    port: '25',
    from: 'mailer@localhost.lan'
})

Settings for the outgoing mailer (for emails involving user registration/password resets)

Client Configuration

As the client will utilise web sockets to connect to the server, you'll need to customise the client configuration file (located at /public/config.json) to point to your server's publically accessible IP. The port will be identical to the port specified in the server-side configuration (defaulted to 4567).