Skip to content

birolemekli/nodejs_restful

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

NodeJS MongoDB CRUD

Installation

  1. Go to the link and download mongodb. [MongoDB Page] https://www.mongodb.com/download-center/community

  2. Go to the link and download nodejs. [NodeJS Page] https://nodejs.org/en/download/

  3. Start mongodb service

  mongod
  1. in the directory where the package.json file is
  npm install
  1. in the directory
  npm start
  1. How to create a RESTful crud api using Nodejs?
  http://localhost:5000/api/users  -> Method: Get  |  all users
  http://localhost:5000/api/users/id  -> Method: Get  |  Single user
  http://localhost:5000/api/users/id  -> Method: Delete  |  Delete single user
 http://localhost:5000/api/users/id  -> Method: Post  |  Add user body param requires -> name,email,password
 http://localhost:5000/api/users/id  -> Method: Put  |  Update single user body params -> name or email or password

Releases

No releases published

Packages

No packages published