Skip to content

Commit e189da6

Browse files
authored
TTA-91-refactor-time-tracker-ui-readme-md (#897)
* Update README.md Add how to run this project in dev and prod mode * Update README.md * TTA-91 Update README * TTA-91 refactor readme file
1 parent 86bee39 commit e189da6

File tree

1 file changed

+26
-7
lines changed

1 file changed

+26
-7
lines changed

README.md

Lines changed: 26 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -77,23 +77,42 @@ Install the following extensions(optional):
7777
- `Prettier - Code formatter`.
7878
- Go to user settings (`settings.json`) and enable formatting on save: `"editor.formatOnSave": true`.
7979

80-
## Development server
80+
## How to run this project
8181

82-
Yo have 2 ways to run this project in dev mode:
82+
You have two ways to run this project locally:
8383

84-
**First**:
85-
- In your project path, open your favourite command line and run the follwing commands: `make build` then `make run` and finally `make logs`. When the project is successfully compiled you can go to `http://localhost:4200/` in your browser. Remember you must have your Docker running.
84+
**First (Using Docker)**:
8685

87-
**Second**:
86+
In your project path, open your favourite command line and run the follwing commands:
87+
88+
To run the project in development mode:
89+
- `make build` to create a docker image with dependencies needed for development.
90+
- `make run` to execute the development docker container.
91+
- `make logs` to show logs of time-tracker-ui in real time.
92+
- `make stop` to stop the development docker container.
93+
94+
To run the project in production mode (only for locally testing purposes):
95+
- `make build_prod` to create a docker image with dependencies needed for production.
96+
- `make run_prod` to execute the production docker container.
97+
- `make stop_prod` to stop the production docker container.
98+
99+
When the project is successfully compiled you can go to `http://localhost:4200/` in your browser. *Remember you must have your Docker running for both cases.*
100+
101+
**Second (Without using Docker)**:
102+
103+
Note: If you're on windows, use bash to set up the environment.
88104

89-
note: If you're on windows, use para bash to set up the environment.
90105
- Set the environment variables executing the following commands:
91106
```bash
92107
set -a
93108
source .env
94109
set +a
95110
```
96-
- Run `ng serve` to run the app in dev mode. After executing this command, you can navigate to `http://localhost:4200/` to see the app working. This method is usefull when you want to run a specific branch using less time but not recommended when doing QA.
111+
112+
- Run `ng serve` to run the app in development mode.
113+
- Run `ng serve --prod` to run the app in production mode (pointing to the production backend).
114+
115+
After executing this command, you can navigate to `http://localhost:4200/` to see the app working. This method is usefull when you want to run a specific branch using less time but not recommended when doing QA.
97116

98117
In any case, the app will automatically reload if you change anything in the source files.
99118

0 commit comments

Comments
 (0)