1.2.3 • Published 5 years ago

food-server v1.2.3

Weekly downloads
2
License
ISC
Repository
github
Last release
5 years ago

What is this?

Runs simple server

Installation

npm i food-server

Then...

package.json
"scripts": {
"server": "nodemon <path to file>"
}
const server = require('food-server')
const port = 8080;
server(port);

options

Server support following options(functionaly will be growing with time):

  • // Products //
  • GET /products - shows an array of all avaiable products
  • GET /produuts/id - shows product(obj) with unique id
  • GET /products?ids=id,id,id - shows an array of products with id's
  • GET /products?cat=category,category - shows and array of products with matched categories
  • // Users //
  • GET /user/id - shows the user with unique id
  • POST /user - creates new user
  • POST /user - (form-data) possibility to appload an image to user
  • // Orders //
  • POST /orders - creates an order, requires user's and products id's
1.2.3

5 years ago

1.2.2

5 years ago

1.2.1

5 years ago

1.2.0

5 years ago

1.1.0

5 years ago

1.0.0

5 years ago