Skip to content

Commit d2ea485

Browse files
authored
Update README.md
Add how to run this project in dev and prod mode
1 parent 2cfe188 commit d2ea485

File tree

1 file changed

+25
-5
lines changed

1 file changed

+25
-5
lines changed

README.md

Lines changed: 25 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -77,23 +77,43 @@ 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

8484
**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.
85+
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 logs` to show logs of time-tracker-ui in real time.
98+
- `make stop_prod` to stop the production docker container.
99+
100+
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.*
86101

87102
**Second**:
88103

89-
note: If you're on windows, use para bash to set up the environment.
104+
Note: If you're on windows, use bash to set up the environment.
105+
90106
- Set the environment variables executing the following commands:
91107
```bash
92108
set -a
93109
source .env
94110
set +a
95111
```
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.
112+
113+
- Run `ng serve` to run the app in development mode.
114+
- Run `ng serve --prod` to run the app in production mode (pointing to the production backend).
115+
116+
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.
97117

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

0 commit comments

Comments
 (0)