DEV Community

Cover image for Blog API with Nodejs,Expressjs and Mongodb

Blog API with Nodejs,Expressjs and Mongodb

Collins Mbathi on October 11, 2021

Introduction This is a simple API for a blog. It includes authentication so that only the owner of the blog can create, edit, and delete...
Collapse
 
obaino82 profile image
Obaino82 •

Thank you for sharing 🙌

Collapse
 
wilsonibekason profile image
Wilson Ibekason •

v

Collapse
 
collins87mbathi profile image
Collins Mbathi •

Thanks just fixed it

Collapse
 
msnimbal profile image
msnimbal •

How to test validity of the user if they try to post without logging in?

Collapse
 
collins87mbathi profile image
Collins Mbathi •

In the register you can try to find user if they exist using ID.if the user exist it will return "the user exist " message.if the user doesnot then it will save the details..forgot to add the functionality

Collapse
 
msnimbal profile image
msnimbal •

thanks Collins, I will look forward for your next post. This post is very well written and clear, It will be nice if you post something around managing state using cookie-session as well.

Thread Thread
 
collins87mbathi profile image
Collins Mbathi •

Okay i will work on it

Collapse
 
wambua_5314 profile image
Wambua vee •

Well written

Collapse
 
hakztv profile image
Telvin •

Hello, this was lovely but the delete route didnt work in post man

Collapse
 
taiworoqeeb profile image
Raqeeb Taiwo •

Arigato

Collapse
 
rajat_sd21 profile image
Rajat Prajapati •

Have you posted the next post to test this api on PostMan??