Code for following along DevSoc session on building APIS with nodejs and expressjs
- Install
node
- Install
mongodb
or usemongodb Atlas
The session is divided into 6 parts. We will progressively build our tiny "blog" app through this session.
You need to git checkout
the branch you of the part we are working on and you are good to go.
The order of branch to be followed is:
basic_setup
- Get a feel ofexpressjs
and get a server on you laptop up and running.add_basic_routes
- Add simple routes for common http verbs likeGET
,POST
, etc.add_schema
- Use mongoose and get make a schema for storing your posts in a database by making a schema.add_crud_for_posts
- Connect your routes with database.add_user_schema
- Add another schema to store users in the databaselogin/signup
- Add basic login/signup feature withbcryptjs
andjsonwebtoken
.