Vue framework With Node Express For Server.
- this app incudes test with Jest
- Node JS : https://nodejs.org/en/download/ (install npm packege by default)
- open terminal at folder 'my-app', run:$ npm install
- open terminal at folder 'server', run: $ npm install
- client run: open terminal at folder 'my-app'
- $ npm run serve
- client: http://localhost:8080/
- test : open terminal at folder 'my-app'
- $ npm run test
- open terminal at folder 'server'
- $ npm run start
- server: http://localhost:3000/
- Node js express for server side + handle CORS on server
- client VUE
- for UI: bootstrap-vue
- node FS for state maintain in file system
- test with jest
single page application that lets sellers fill their COGS (cost of goods) of each product. The app display the seller’s products, and once the seller selects a product from the list, the seller will be shown a form page where the seller can update COGS fields of the selected product.
For each product - display + edit
- Unit manufacturing cost (currency)
- Shipment unit cost (currency)
- Monthly advertising cost (currency)
- Manufacturing country (dropdown)
- DB (file system: productsDataBase.json) - Hash
- { "B08QPPGNNZ":{"productName":"MediChair Kneeling Chair", "cogs":{"unitManufacturingCost":61,"shipmentUnitCost":789,"monthlyAdvertismentCost":967,"manufacturingCountry":"CO"} } }
- the server return to client a data of array of objects
- GET - /products - retrieve a list of seller products
- GET - /countries - retrieve a statuc list of countries
- POST - /cogs - save the cost data for a product
with mock data for country + products array
- remove and add elements to the dom while chage display mode (form/read only)
- get country name by key
- post product with many requests