Skip to content

This is a simple project to demonstrate how to use MongoDB with Express.js

Notifications You must be signed in to change notification settings

mtoof/Bookstore_API

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Bookstore API

This is a simple project to demonstrate how to use MongoDB with Express.js. The project is a simple REST API that allows you to create, read, update and delete objects from a MongoDB database. I have dockerized all the project.

Installation

Make sure you have docker installed on your machine. Simply run the following command to start the project:

make # To run the project

This will start a MongoDB container and an Express.js container. The Express.js container will be available on port 3000.

Usage

You can use the following endpoints to interact with the API:

/books - GET - Get all books

/books/:id - GET - Get a book by id

/books/ - POST - Create a new book

/books/:id - PUT - Update a book by id

/books/:id - DELETE - Delete a book by id

Stop and deleting the containers

make down # To stop the project
make clean # To delete all the containers

About

This is a simple project to demonstrate how to use MongoDB with Express.js

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published