Files
NodeBB/docs/running/index.rst

45 lines
1.4 KiB
ReStructuredText
Raw Normal View History

2014-04-28 17:01:32 -04:00
Running NodeBB
================
The preferred way to start and stop NodeBB is by invoking its executable:
2014-04-28 17:02:36 -04:00
* ``./nodebb start`` Starts the NodeBB server
* ``./nodebb stop`` Stops the NodeBB server
* Alternatively, you may use ``npm start`` and ``npm stop`` to do the same
2014-04-28 17:01:32 -04:00
The methods listed below are alternatives to starting NodeBB via the executable.
Simple Node.js Process
-----------------------
2014-04-28 17:02:36 -04:00
To start NodeBB, run it with ``node`` (some distributions use the executable ``nodejs``, please adjust accordingly):
2014-04-28 17:01:32 -04:00
.. code:: bash
$ cd /path/to/nodebb/install
$ node app
However, bear in mind that crashes will cause the NodeBB process to halt, bringing down your forum. Consider some of the more reliable options, below:
Supervisor Process
-----------------------
2014-04-28 17:02:36 -04:00
Using the `supervisor package <https://github.com/isaacs/node-supervisor>`_, you can have NodeBB restart itself if it crashes:
2014-04-28 17:01:32 -04:00
.. code:: bash
$ npm install -g supervisor
$ supervisor app
2014-04-28 17:02:36 -04:00
As ``supervisor`` by default continues to pipe output to ``stdout``, it is best suited to development builds.
2014-04-28 17:01:32 -04:00
Forever Daemon
-----------------------
2014-04-28 17:02:36 -04:00
Another way to keep NodeBB up is to use the `forever package <https://github.com/nodejitsu/forever>`_ via the command line interface, which can monitor NodeBB and re-launch it if necessary:
2014-04-28 17:01:32 -04:00
.. code:: bash
$ npm install -g forever
$ forever start app.js