What we have now
We have to build docker images of UI and add them to local-env to see changes.
What we want to get
We want to be able to run service's UI locally to see the changes quicker without docker image build.
Run UI using a special script from package.json in one command.
Solution
Need a way to determine that this mode is on with the help of a new env variable or config.
If we understand that local-env mode is on, we will be able to turn on the proxy in vite config.
Depending on the mode, we will need to specify port of local-env (30900) to connect layout-ui.
Possible Flow
- Run time-ui locally on port 3507
- layout-ui is used from local-env (via a new env var) (or proxy)
- api is used from local-env (or proxy)
- refresh is covered with proxy and thus is on and is real from local-env
- Since there is no token in local storage of http://localhost:3507/time
- time-ui has a configured proxy from http://localhost:3507/auth to http://localhost:30090/auth
- Redirects to login page on http://localhost:3507/auth?redirectUrl=http://localhost:3507/time
- Enter login and password from a real Local Env account
- It creates a token in local storage of http://localhost:3507 and redirects to http://localhost:3507/time
- All requests to api go to http://localhost:30090/api/time(sort-of) with this token
What we have now
We have to build docker images of UI and add them to local-env to see changes.
What we want to get
We want to be able to run service's UI locally to see the changes quicker without docker image build.
Run UI using a special script from package.json in one command.
Solution
Need a way to determine that this mode is on with the help of a new env variable or config.
If we understand that local-env mode is on, we will be able to turn on the proxy in vite config.
Depending on the mode, we will need to specify port of local-env (30900) to connect layout-ui.
Possible Flow