valeriopisapia / todo-NodeJS

RESTful API using Node and Express

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

todo-NodeJS

RESTful API using Node and Express

  • Handle CRUD for an item (we’re going to use todos)
  • Use the proper HTTP verbs to make it RESTful (GET, POST, PUT, andDELETE)
  • Return JSON data

#Getting Started

  • define our Node packages
  • start our server using Express
  • define our model
  • declare our routes using Express
  • test our API

Make sure you have Node installed and let’s get to it!

INSTALLING OUR NODE PACKAGES

npm install

STARTING OUR SERVER AND TESTING

node app.js

#Structure

  • app.js
  • config/ --> Mongo configuration
  • controllers/
    • apiController.js
    • setupController.js
  • models/ --> Todo Model
  • public/
  • views/
  • node_modules/
  • package.json

About

RESTful API using Node and Express


Languages

Language:JavaScript 100.0%