-
Refactoring of business logic out of app component into a service class: product-service.ts.
-
A test of the above service: product-service.spec.ts
Add a test for the server side: get('/temperature/:id'
- ran out of time
Not so much.
NOTE: getting information by each beer ID could be a performance issue if types become many (think of a bulk API).
The idea is that all product-related business logic is in the "service" layer of the client. Therefore, the app component does not have the logic and merely wraps the service. The service layer contains necessary unit tests.
npm install
- Installs dependencies client and server appsnpm start
- Runs client and server apps
npm start
- Start the application (Port 4200)npm test
- Runs available tests
npm start
- Start the application (Port 8081)