Skip to content

Bookstore application exposing GET, PUT, POST, DELETE operations

Notifications You must be signed in to change notification settings

Harsh291104/bookstoreAPI

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Bookstore - Simple bookstore API exposing GET, PUT, POST, DELETE Operations using NodeJS, ExpressJS and MongoDB##

##Prerequisite 1.) Download code from repository. 2.) Install node JS - Configure Paths - Verify via running npm install app command on terminal. 3.) npm install express --save 4.) Install and configure MongoDB

  • create directories /data/db in your root folder and provides full executable permissions.
  • ./mongond - RUN Mongo daemon in one terminal
  • ./mongo - RUN Mongo server in other terminal
  • mongoimport -d bookstore -c books books.json - Import books collection
  • mongoimport -d bookstore -c books genreSchema.json - Import genres collections

5.) node app - This will run the nodejs server on port 9090, ready to listen to request. 6.) Use any REST client Postman or RESTeasy to issue GET, PUT, POST, DELETE requests on http://localhost:9090/api/books http://localhost:9090/api/genres http://localhost:9090/api/books/5a71b8866a2f4a334b0c7873 - Use id in the json object to delete and update books, genre collection

##DB commands used use bookstore db.createCollection('books') db.createCollection('genres') db.books.find()

About

Bookstore application exposing GET, PUT, POST, DELETE operations

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published