A basic blog app that provides platform to post write-ups. It implements CRUD operations by providing additional functionalities of updating and deleting created posts. It also implements the RESTful convention.
- Home Page
- New Post
- Edit Post
- Delete Post
Ensure you have node.js installed on your local machine. To be sure you have it installed, run the command node -v
Ensure you have mongodb installed on your local machine. To verify that you have mongodb installed;
-
Open the command prompt on your windows machine. Note that it would only work on windows command prompt, and not the bash terminal
-
Navigate to the root folder of MongoDB installation and run the command
mongo
ormongo.exe
-
It will display the version of the installed MongoDB if currently installed
Run npm install
to install the dependencies
To start the database;
-
Open the command prompt on your windows machine. Again, note that this would only work on windows command prompt, and not the bash terminal
-
Navigate to the root folder of MongoDB installation and run the command
mongod
ormongod.exe
-
Ensure it prints
waiting for connection on port...
You can now go ahead and run the app using the following procedures
-
Open any terminal of your choice
-
Run the command
node app.js
-
Wait till the console prints
RESTful-blog-app server have started on port 3000!
andConnected to database
At this point, the command prompt running the database above should now print connection accepted from...
After the successful installation and running of the app from the last section, proceed to launch the app in the browser at http://localhost:3000
It will bring you to the home page, which is also the index page where you can view all the posted write-ups
Clicking on NewPost
on the menu will bring a page to write and upload new contents
From the index page, clicking Read More
will display the full content of the particular post. From there, one can click the Edit
and Delete
button to update and delete the content respectfully.
Technologies used include HTML, CSS, SemanticUI, EJS templates, Node.js, Express.js, MongoDB, Mongoose
-
Open up a new issue, and describe the feature you want to contribute
-
Fork this repository.
-
Clone it to your local machine, so you can open it in your prferred editor.
-
Create a new branch for your task, and add a descriptive branch name using the git command:
git checkout -b (branch name)
-
After implementation, commit your changes with a descriptive commit message, the commit message should give an idea of the feature you worked on, use the git command:
git commit -m "commit message"
-
Push changes to your forked repo with the new branch you created using the git command:
git push origin your-branch-name
-
Create a pull request to the
develop
branch of this repository from your forked repo on github. The button is on the GUI
- Pro tip: It is possible that commits may have been merged to this repository, to avoid conflicts, fetch and merge from this repo on the GUI, then you can update your local machine by using the command:
git pull