It consists some default blog posts and you can add more info by going to the /compose
route
It is not hosted on a Web server though.
So, you need to host the website locally on port 3000
.
This is a blog website which is an online journal where an individual, group, or corporation presents a record of activities, thoughts, or beliefs.
Here, we need to setup two local servers. One for the database and one for the website backend.
- Install MongoDB by visiting the official website
(https://www.mongodb.com/try/download/community)
and downloading the latest community installer. You need to sign up first to be able to download. - After installing MongoDB, you need to create a directory
/data/db
exactly with the same name (case sensitive) so that the database will be stored inside that directory. - Create a .bash_profile folder in the root directory and edit it using vim editor and insert
alias mongod="/c/Program\ Files/MongoDB/Server/5.0/bin/mongod.exe"
andalias mongo="/c/Program\ Files/MongoDB/Server/5.0/bin/mongo.exe"
- Run the command
mongod
which then starts the server onlocalhost:27017
- Now run command
mongo
to open the MongoDB shell.
- Download and install NodeJS in the official website
(https://nodejs.org/en/download/)
. - Run the command
npm init
which initializes the web directory structure and adds the node modules. - Now delete all the folders except node modules and paste all the codes using the same directory structure as provided.
- Install the library files required by using command
npm i express ejs lodash mongoose
- Now you can run the server by using command
node app.js
which in turn runs the website onlocalhost:3000