This API is created to exchange data with our web page
npm install
to install dependencies.npm start
ornode bin/www
to start the server.git pull
to pull newest changed from the repositorys.PORT=9000 npm start
to start on port 9000 (change the number to use another port).
By default the sever is set to run on port 3001
To create a route
- create a file at /routes/filename.js
require
it at /app.jsapp.use()
it at /app.js- create responses at /routes/filename.js
Great!! We have a new route!
GET
typical request from a browser.POST
is used to update data.PUT
is used to create dataDELETE
is used to remove data.