Discussion Forum: NodeBB setup

This document will help to setup, config and use NodeBB

Background

Discussion Forum library uses NodeBB for for DB related operations. So NodeBB needs to be installed for local development.

Local setup of Sunbird-Discussion-UI(playgroung application)
Refer NodeBB installation steps for more info.

Prerequisites

  1. NodeJS should be installed (version 14+ recommended)

  2. MongoDB should be installed

Steps to install NodeBB

  1. create two users using mongo Shell

mongo use admin db.createUser( { user: "admin", pwd: "Test@321", roles: [ { role: "root", db: "admin" } ] } ) use nodebb db.createUser( { user: "nodebb", pwd: "Test@321", roles: [ { role: "readWrite", db: "nodebb" }, { role: "clusterMonitor", db: "admin" } ] } )

2. Clone the NodeBB repo in your local

git clone -b v1.16.x https://github.com/NodeBB/NodeBB.git nodebb cd nodebb

3. run NodeBB setup and use admins username and password

./nodebb setup

4. start NodeBB

5. build NodeBB

6. You can see the NodeBB UI in:

 

Nodebb setup using script

 

  • Create a nodebb.sh file and add the below snippet into file.

  • Run the script file using command bash nodebb.sh.

  • While running the script, nodebb will ask below question for initial setup.

  • once setup completed, It will open browser with url http://localhost:4567.

  • you can login with admin credentials and setup got completed.