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
128128
129129### Development setup with proxy.
130130
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.
132134
133135``` 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+ }
146146```
147147
148148#### ** ` .env.development ` **
@@ -191,10 +191,10 @@ First you need to have the backend project up and running and the dashboard repo
191191
192192- Run yarn in the dashboard repo root
193193- Open the project in your preferred IDE
194- - Open the ` setupProxy.js ` file
194+ - Open the ` vite.config.ts ` file
195195- Change the target URL of the orchestrator. Replace it with the URL of your orchestrator
196196- Save the file
197- - Run ` npm run start`
197+ - Run ` yarn start`
198198- Go to ` localhost:3000 `
199199- Click Login as administrator
200200- 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 }) => {
8282 port : 3000 ,
8383 proxy : {
8484 '/orchestrator' : {
85- // @TODO : Change target to a default value
86- target : 'https://devtron-4.devtron.info/' ,
85+ target : 'https://preview.devtron.ai/' ,
8786 changeOrigin : true ,
8887 } ,
89- '/grafana' : 'https://demo .devtron.info /' ,
88+ '/grafana' : 'https://preview .devtron.ai /' ,
9089 } ,
9190 } ,
9291 }
You can’t perform that action at this time.
0 commit comments