A REST API that exposes the data generated by data-generator-retail using JSON Server.
Clone this repository, then run:
npm install
npm start
The data will be available at http://localhost:3000
.
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
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
MIT, courtesy of Marmelab