...
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.
...
Code Block |
---|
http://localhost:4567 |
Nodebb setup using script
Create a
nodebb.sh
file and add the below snippet into file.
Code Block |
---|
echo ">> Nodebb cloning..."
git clone -b v1.16.x https://github.com/NodeBB/NodeBB.git nodebb
echo ">> Nodebb clone completed!"
cd nodebb
echo ">> Nodebb setup..."
./nodebb setup
echo ">> Nodebb setup completed"
echo ">> Installing nodebb plugins....."
npm install https://github.com/Sunbird-Ed/nodebb-plugin-sunbird-oidc.git#master
npm install https://github.com/Sunbird-Ed/nodebb-plugin-sunbird-api.git#release-4.2.0
npm install https://github.com/NodeBB/nodebb-plugin-write-api.git#master
echo ">> Plugin instalation completed"
echo ">> Activating nodebb plugins..."
./nodebb activate nodebb-plugin-create-forum
./nodebb activate nodebb-plugin-sunbird-oidc
./nodebb activate nodebb-plugin-write-api
echo ">> Plugins are activated"
./nodebb start
./nodebb build
open http://localhost:4567
|
Run the script file using command
bash nodebb.sh
.While running the script, nodebb will ask below question for initial setup.
Code Block >> URL used to access this NodeBB (http://localhost:4567) : Press Enter >> Please enter a NodeBB secret (44abfc50-3d6a-4e6c-a258-9f551f9faa5a) : Press Enter >> Would you like to submit anonymous plugin usage to nbbpm? (yes) : Press Enter >> Which database to use (mongo) : redis Now configuring redis database: >> Host IP or address of your Redis instance (127.0.0.1) : Press Enter >> Host port of your Redis instance (6379) : Press Enter >> Password of your Redis database : Press Enter >> Which database to use (0..n) (0) : 3 (redis db number) Admin User details >> Administrator username : admin >> Administrator email address : admin@test.com >> Password : Your password >> Confirm Password : Your password
once setup completed, It will open browser with url http://localhost:4567.
you can login with admin credentials and setup got completed.