This is a Angular project that displays a list of tariffs for a company. The project uses JSON-server to run the API, npm run start to start the application, and npm run test to run the unit test cases.
Navigate to the demo-tariff-list directory and execute the following commands.
-
Clone the repository to your local machine.
-
Open a terminal window and navigate to the project directory.
-
Run
npm installto install the project dependencies.
-
Open a terminal window and navigate to the project directory.
-
Run
npm run apito start the JSON-server.
The API will be available at http://localhost:3000/tariffs.
-
Open a terminal window and navigate to the project directory.
-
Run
npm run startto start the Angular application.
The application will be available at http://localhost:4200.
-
Open a terminal window and navigate to the project directory.
-
Run
npm run testto run the unit tests.
The test results will be displayed in the terminal window.
-
The
src/appdirectory contains the Angular components, services, and models used in the project. -
The
src/assetsdirectory contains the mock tariff data in JSON format utilized in the project. -
The
src/stylesdirectory contains the imported CSS styles from Bootstrap, angular material etc. used in the project. -
The
tariffData.jsonfile contains the data for the tariffs API.