Frontend de l'outil de Gestion du Temps de Travail (GTT).
This project was generated with Angular CLI version 15.2.11.
Install NVM on your machine if it's not alread done. See the NVM "Installing and Updating" documentation.
To install this project in development mode, clone the project into your local workspace:
git clone https://github.com/cbn-alpin/gtt-webapp.gitNavigate to the cloned project folder:
cd gtt-webapp/Load (or install) Node and Npm recommended version:
# If they are not installed, use:
nvm install
# Enable the appropriate version of Node and npm:
nvm useInstall the dependencies:
npm installWe use ng serve for a dev server. This command is accessible with:
npm startNavigate to http://localhost:4200/. The application will automatically reload if you change any of the source files.
Run npm run ng -- generate component component-name to generate a new component. You can also use ng generate directive|pipe|service|class|guard|interface|enum|module.
Run npm run build to use ng build to build the project. The build artifacts will be stored in the dist/ directory.
Specify the environment (production by default or development) to use, like this: npm run build -- --configuration production
For hot-reloading, use the command: npm run watch
Run npm run test to use ng test to execute the unit tests via Karma.
Run npm run e2e to use ng e2e to execute the end-to-end tests via a platform of your choice.
We use Cypress for end-to-end tests. So, you can use this command too:
# Open the Cypress interface:
npm run cypress:open
# Run the tests if Angular dev server is running:
npm run cypress:runWe use Prettier, EditorConfig and Eslint.
To check the code source format use: npm run format:check
To format the code use: npm run format
To run lint use : npm run lint
To get more help on the Angular CLI use npm run ng help or go check out the Angular CLI Overview and Command Reference page.
To build an image localy use : docker build -t gtt-webapp:develop --build-arg ANGULAR_ENV="development" .
When you run the image you can pass this environment variables with your own values :
API_URL="http://127.0.0.1:5000/api"
GOOGLE_CLIENT_ID="apps.googleusercontent.com"