AzizSudrajat / nodejs_restfullapi_express_mongo

Build RESTfull API with NodeJS (Express) and MongoDB

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

NodeJS - API - API RESTfull

RESTfull API build on :

Installation

NodeJS required Link v15.* to run NPM required Link v7.* to run Mongo DB Community required Link

- Download or Clone from Github -
cd nodejs_restfullapi_express_mongo
touch .env
echo "PORT=:8000" >> .env
echo "MONGODB=mongodb://{yourhost}/{yourcollection}" >> .env

Running Code

npm install
npm start

API Endpoint

METHOD ENDPOINT Description
GET http://{yourhost}:8000/api/contacts GET ALL Contacts
GET http://{yourhost}:8000/api/contact/{id} GET ONE Contact
POST http://{yourhost}:8000/api/contact CREATE Contact
PUT http://{yourhost}:8000/api/contact/{id} UPDATE Contact
DELETE http://{yourhost}:8000/api/contact/{id} DELETE Contact

Postman Collection

File on Directory demo/postman

License

MIT

About

Build RESTfull API with NodeJS (Express) and MongoDB


Languages

Language:JavaScript 100.0%