This project aims to practice the context creation in a shop cart application.
- Install dependencies:
npm i
- Run JSON server
npm run server
API running on http://localhost:3333. Available routes:
- GET /stock
- GET /stock/:productId
- GET /products
- GET /products/:productId
- Run development server
npm start
Open http://localhost:3000 with your browser to see the result.
The project uses Jest to run tests. Once the app is running use the command:
npm run test
If you have problems instaling dependencies it is possible that the make command is not available in your linux. To fix it, install the build-essential system package.
sudo apt-get install build-essential