Skip to content

9khil/inventoryapp

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

15 Commits
 
 
 
 
 
 
 
 

Repository files navigation

inventoryapp

simple inventory app

Install

Prereqs: mongodb, node 16+,

  1. Install and start mongodb (https://docs.mongodb.com/manual/tutorial/install-mongodb-on-os-x/)

  2. npm install in server/ folder

  3. 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.

  1. npm install in inventory/ folder

  2. npm run dev in /inventory folder

  3. Visit http://localhost:3000/

API

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 }