data-generator-retail-api

1.0.0 • Public • Published

Local E-Commerce API With Fake Data

A REST API that exposes the data generated by data-generator-retail using JSON Server.

Installation

npm install

Usage

npm start

The data will be available at http://localhost:3000, and exposed in HTTPS via localtunnel (see URL in the console). You will need to visit the URL via a web browser once before using the API.

Available endpoints:

  • /products (GET, POST)
  • /products/:id (GET, PUT, DELETE)
  • /categories (GET, POST)
  • /categories/:id (GET, PUT, DELETE)
  • /orders (GET, POST)
  • /orders/:id (GET, PUT, DELETE)
  • /customers (GET, POST)
  • /customers/:id (GET, PUT, DELETE)
  • /invoices (GET, POST)
  • /invoices/:id (GET, PUT, DELETE)
  • /reviews (GET, POST)
  • /reviews/:id (GET, PUT, DELETE)

See the JSON server documentation for more information on route parameters, e.g.:

  • /products?_page=1&_limit=10&_sort=price&_order=asc

HTTPS & Sharing

The app exposes the API on localhost in HTTP. You can expose it in HTTPS via a local tunnel, e.g. using serveo:

ssh -R 80:localhost:3000 serveo.net

LICENSE

MIT, courtesy of Marmelab

Readme

Keywords

none

Package Sidebar

Install

npm i data-generator-retail-api

Weekly Downloads

0

Version

1.0.0

License

MIT

Unpacked Size

3.46 kB

Total Files

3

Last publish

Collaborators

  • fzaninotto