1.0.0 • Published 1 year ago

data-generator-retail-api v1.0.0

Weekly downloads
-
License
MIT
Repository
-
Last release
1 year ago

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

1.0.0

1 year ago