Skip to content

timmyktom/restapi.example

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

8 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

restapi.example

A simple RESTApi example with nodejs, tingodb(embedded db)

Global Dependencies

Dependency Version Install
NodeJS 5.x.x http://node.org
npm 3.x.x http://node.org

Install

$ npm install

Used tingodb (embedded db) instead of mongodb.

$ npm install tingodb

usages

  • Allows to set up middlewares to respond to HTTP Requests.
  • Defines a routing table which is used to perform different action based on HTTP Method and URL.
$ npm install express

Used body-parser

usages

  • This is a node.js middleware for handling JSON, Raw, Text and URL encoded form data.
$ npm install body-parser

Used flow for Synchronization between collections joining purpose

$ npm install flow

Recommended Workflow

  • Download server.js, category.js, product.js files to a folder
  • Go to that folder in command prompt
  • Do the installations mentioned above
  • Start using the api calls like [http://localhost:8085/api/listCategories] or [http://127.0.0.1:8085/api/listCategories] as the services are listening to port no [8085]

License

MIT

About

RESTApi example with nodejs, tingodb(embedded db)

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published