File tree Expand file tree Collapse file tree 2 files changed +17
-18
lines changed Expand file tree Collapse file tree 2 files changed +17
-18
lines changed Original file line number Diff line number Diff line change @@ -128,21 +128,21 @@ foo@bar~$ python uploadTestReport.py
128
128
129
129
### Development setup with proxy.
130
130
131
- #### ** ` src/setupProxy.js ` **
131
+ #### ** ` vite.config.ts ` **
132
+ Update the ` vite.config.ts ` file to include the proxy configuration.
133
+ In proxy object, add the target URL of the orchestrator and grafana.
132
134
133
135
``` js
134
- const { createProxyMiddleware } = require (' http-proxy-middleware' )
135
-
136
- module .exports = function (app ) {
137
- app .use (
138
- ' /orchestrator' ,
139
- createProxyMiddleware ({
140
- target: ' http://demo.devtron.info:32080' ,
141
- changeOrigin: true ,
142
- logLevel: ' info' ,
143
- }),
144
- )
145
- }
136
+ server: {
137
+ port: 3000 ,
138
+ proxy: {
139
+ ' /orchestrator' : {
140
+ target: ' https://preview.devtron.ai/' ,
141
+ changeOrigin: true ,
142
+ },
143
+ ' /grafana' : ' https://preview.devtron.ai/' ,
144
+ },
145
+ }
146
146
```
147
147
148
148
#### ** ` .env.development ` **
@@ -191,10 +191,10 @@ First you need to have the backend project up and running and the dashboard repo
191
191
192
192
- Run yarn in the dashboard repo root
193
193
- Open the project in your preferred IDE
194
- - Open the ` setupProxy.js ` file
194
+ - Open the ` vite.config.ts ` file
195
195
- Change the target URL of the orchestrator. Replace it with the URL of your orchestrator
196
196
- Save the file
197
- - Run ` npm run start`
197
+ - Run ` yarn start`
198
198
- Go to ` localhost:3000 `
199
199
- Click Login as administrator
200
200
- Provide Admin as username and password from Devtron BE
Original file line number Diff line number Diff line change @@ -82,11 +82,10 @@ export default defineConfig(({ mode }) => {
82
82
port : 3000 ,
83
83
proxy : {
84
84
'/orchestrator' : {
85
- // @TODO : Change target to a default value
86
- target : 'https://devtron-4.devtron.info/' ,
85
+ target : 'https://preview.devtron.ai/' ,
87
86
changeOrigin : true ,
88
87
} ,
89
- '/grafana' : 'https://demo .devtron.info /' ,
88
+ '/grafana' : 'https://preview .devtron.ai /' ,
90
89
} ,
91
90
} ,
92
91
}
You can’t perform that action at this time.
0 commit comments