REST API

REST API – Representational State Transfer Application Programming Interface

http://www.restapitutorial.com/

  • HTTP Methods

GET – to retrieve data from the server
POST – to send data to the server
PUT – to update data
DELETE – to delete data

getpostman.com – testing http requests

  • HTTP Status Codes

200 – ok
404 – resource not found
500 – server error

  • Setting up MongoDB
  1. download mongodb
  2. create data folder in c:\
  3. enter “C:\Program Files\MongoDB\Server\3.4\bin\mongod.exe” in the data folder
  • Install Node
  1. npm init in the project file folder
  2. npm install
  • Set up an Express App
  1. npm install express –save
  2. Code index.js

react

  • Handling Requests in Express

react

  • Creating Routes

react

react

  • Middleware & Handling Post Requests

npm install body-parser –save

react

react

  • MongoDB Models & Schema

react

  • Save Data to MongoDB

react

react

  • Data Error Handling

react

react

  • Delete Requests

react

  • Put Requests

react

  • GeoJSON

react

  • Handling Get Requests

react

  • Creating a Front-End

react

react

Advertisements

About bernadetteengleman

Hello, I am Bernadette from New York City. I moved here from Chicago in 2013. I am originally from the Philippines. I started studying web programming in 2015. I love it because I like making fun websites and web apps. The projects that I built so far are posted below. I like to cook and I love to travel. I also like to volunteer and I am a team leader with the non-profit organization, NYCares.
This entry was posted in Node.js and tagged , , , . Bookmark the permalink.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s