Skip to content

Basic REST API to test routes and CRUD functions with JavaScript.

Notifications You must be signed in to change notification settings

aildsonf/rest_api_js

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

41 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

REST API using JavaScript

This Project uses JavaScript + Node.JS and MongoDB

Tools used in this Project:

Instructions

  1. You can either use node server.js or npm run dev script to start the API;

  2. The base URL is http://localhost:5000/api/patients/;

  3. For HTTP request methods:

    • 3.1. GET api/patients/
    • 3.2. GET api/patients/:id
    • 3.3. POST api/patients/
    • 3.4. PUT api/patients/:id
    • 3.5. DELETE api/patients/:id
  • In order to use npm run dev, install npm install -D nodemon as devDependencies

  • GET, POST, PUT methods return data in json format

  • Replace ':id' with _id string attribute

   {
      "_id": "0a000000000b00000cde00fg",
      ..
   }

About

Basic REST API to test routes and CRUD functions with JavaScript.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published