simple inventory app
Prereqs: mongodb, node 16+,
-
Install and start mongodb (https://docs.mongodb.com/manual/tutorial/install-mongodb-on-os-x/)
-
npm install in server/ folder
-
npm run dev in server/ folder
API should now be running. You can verify with Postman. Look further down in API section for more details.
-
npm install in inventory/ folder
-
npm run dev in /inventory folder
-
Visit http://localhost:3000/
Same endpoint for all calls: /api/inventory Use methods GET, POST, PUT, DELETE
PUT takes inventory object DELETE takes an ID.
Example data for POST:
{ "name": "ESP8266 Wemos D1 dev board", "description": "Wemos D1 dev board. Micro USB, 3.3v and 5v" "inStock": true, "location": 12 }