Skip to content

clock-322/RESTful-API-nodeJs-

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

RESTful-API-nodeJs-

This is a project about RESTful API's. Four type of REST API's methods are mentioned in this project that are GET, POST, PUT, DELETE. This project covers different versions of each REST API's Method from common-type to validation-type to authentic-API type.

RESTful API'S

An API is an application programming interface. It is a set of rules that allow programs to talk to each other. The developer creates the API on the server and allows the client to talk to it and method to talk to each other can be of different type e.g GET, POST, PUT, DELETE.

Getting started

These instructions will get you a basic requirements to run this project.

Prerequisites

Before you start coding you have to install some Node Package Modules.

  1. ExpreJS
  • Fast, unopinionated, minimalist web framework for node
  1. CORS
  • CORS is a node.js package for providing a Connect/Express middleware that can be used to enable CORS with various options.
  1. Dotenv
  • dotenv is used to store the static value in .env .
  1. body-parser
  • To handle HTTP POST request in Express.js, you need to install middleware module which is body-parser.
  • Body-parser extract the entire body portion of an incoming request stream and exposes it on req.body.
  • This body-parser module parses the JSON, buffer, string and URL encoded data submitted using HTTP POST request.
  1. Joi
  • This module is very usefule for validation of data.
  1. Nodemon
  • nodemon is a tool that helps develop node.js based applications by automatically restarting the node application when file changes in the directory are detected.

nodemon app.js

The page will reload if you make edits. You will also see any lint errors in the console.

Built with

About

RESTful API's

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published