This project was generated with Angular CLI version 7.1.4.
Used tools :
- Node.js v8.11.3
- Npm v5.6.0
- Yarn v1.7.0
-
For the mock server:
a) From project directory :
cd mock-serverb) run the command line :
npm install -
For the app:
a) From project directory, run the command line :
npm install
Run ng serve for a dev server. Navigate to http://localhost:4200/. The app will automatically reload if you change any of the source files.
This project is configured to run under a mock configuration. To achieve this, follow these steps :
-
Launch mock server:
a) From project directory :
cd mock-serverb) run the command line :
mock-server startDocumentation is available by running :
mock-server help===> This will start mock server on port 3000
-
Launch the application's custom development server:
a) From project directory:
app-starter mockDocumentation is available by running :
app-starter help===> This will start custom development server on port 8000.
Run ng build to build the project. The build artifacts will be stored in the dist/ directory. Use the --prod --configuration=production --aot flag for a production build.
The project is enhanced with some advanced Angular-based features.
Currency-catalog uses service workers to add offline capabilities, in production mode, when internet connexion goes down.
To simulate this behavior in your local machine, we need basic node server (npm install -g htp-server). Then :
-
From project directory, run
ng build --prod --configuration=production -
Run
cd dist/currency-catalog -
Run
http-server . -
Open the browser and navigate to http://localhost:8080/
-
Reload the page one more time in order to set caches
-
Turn-off WIFI connexion and reload the page, the app is shown even with no internet connexion
The app uses HTTP_INTERCEPTORS to handle requests errors, and show a dialog that indicates 'unavailability of the service' once the server returns an error code.
Currency-catalog app uses angular-flex-layout to set a responsive look and feel.
Run ng test to execute the unit tests via Karma.
Run ng e2e to execute the end-to-end tests via Protractor.
To get more help on the Angular CLI use ng help or go check out the Angular CLI README.