Skip to content

Commit

Permalink
CH-45 Fix linting errors in webapp template
Browse files Browse the repository at this point in the history
  • Loading branch information
condar-metacell committed Sep 18, 2024
1 parent 1efc7c0 commit 60b02ca
Show file tree
Hide file tree
Showing 2 changed files with 26 additions and 24 deletions.
16 changes: 8 additions & 8 deletions application-templates/webapp/frontend/src/App.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -3,14 +3,14 @@ import Version from './components/Version';


const Main = () => (
<>
<img src="/logo.png" width="800" />
<h1>__APP_NAME__ React application is working!</h1>
<Version />
<RestTest />
<p>See api documentation <a href="/api/ui/">here</a></p>
</>
)
<>
<img src="/logo.png" width="800" />
<h1>__APP_NAME__ React application is working!</h1>
<Version />
<RestTest />
<p>See api documentation <a href="/api/ui/">here</a></p>
</>
)


export default Main;
34 changes: 18 additions & 16 deletions application-templates/webapp/frontend/vite.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ export default defineConfig(({ mode }) => {
const env = loadEnv(mode, process.cwd(), '')

const theDomain = env && env.DOMAIN ? env.DOMAIN : 'localhost:5000';

console.log('Dev server address: ', theDomain);

const proxyTarget = theDomain;
Expand All @@ -22,21 +22,23 @@ export default defineConfig(({ mode }) => {


return {
plugins: [react()],
server: {
port: 9000,
proxy: {
'/api/': {
target: replaceHost( proxyTarget, 'samples'),
secure: false,
changeOrigin: true,
},
'/proxy/common/api': {
target: replaceHost( proxyTarget, 'common'),
secure: false,
changeOrigin: true,
rewrite: (path) => path.replace(/^\/proxy\/common\/api/, '/api')
plugins: [react()],
server: {
port: 9000,
proxy: {
'/api/': {
target: replaceHost(proxyTarget, 'samples'),
secure: false,
changeOrigin: true,
},
'/proxy/common/api': {
target: replaceHost(proxyTarget, 'common'),
secure: false,
changeOrigin: true,
rewrite: (path) => path.replace(/^\/proxy\/common\/api/, '/api')
}
}
}
}
}}}
}
)

0 comments on commit 60b02ca

Please sign in to comment.