Skip to content

Commit

Permalink
dev server proxy
Browse files Browse the repository at this point in the history
  • Loading branch information
MrBrax committed Apr 26, 2022
1 parent 1365c17 commit 4616429
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 2 deletions.
8 changes: 6 additions & 2 deletions client-vue/src/App.vue
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
<div v-if="errors" class="big-error">
<div v-for="error in errors" :key="error" class="big-error-item">Error</div>
</div>
<router-view v-if="store.config !== null && store.favourite_games !== null" />
<router-view v-if="store.config !== null && store.favourite_games !== null" ref="view" />
<div v-else>
<div class="container">
<section class="section">
Expand Down Expand Up @@ -44,6 +44,9 @@ export default defineComponent({
created() {
this.store.fetchClientConfig();
this.fetchData();
},
mounted() {
},
methods: {
async fetchData() {
Expand All @@ -65,7 +68,7 @@ export default defineComponent({
}
if (!response.data || !response.data.data) {
alert("No data received");
alert("No data received for settings");
return;
}
Expand All @@ -87,4 +90,5 @@ export default defineComponent({
JobStatus
},
});
</script>
7 changes: 7 additions & 0 deletions client-vue/vite.config.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
// @ts-nocheck
import { defineConfig } from 'vite'
import vue from '@vitejs/plugin-vue'
import path from 'path'
Expand All @@ -16,4 +17,10 @@ export default defineConfig({
'@common': path.resolve(__dirname, '..', 'common'),
},
},
server: {
port: 8081,
proxy: {
'/api': 'http://localhost:8080',
},
},
})

0 comments on commit 4616429

Please sign in to comment.