Skip to content

Vite #93

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 22 commits into from
Oct 23, 2022
Prev Previous commit
Next Next commit
wip #92
  • Loading branch information
previ committed Aug 22, 2022
commit 95ead89efb51be330d92680dfaf99cc23c84ec0d
1 change: 1 addition & 0 deletions .env.development
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
VITE_CB_ENDPOINT=http://localhost:8090
1 change: 1 addition & 0 deletions .env.production
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
VITE_CB_ENDPOINT=''
3 changes: 1 addition & 2 deletions src/main.js
Original file line number Diff line number Diff line change
Expand Up @@ -43,8 +43,7 @@ import CoderBot from './common/coderbot';
// https://github.com/axios/axios/issues/350#issuecomment-227270046

const $axios = axios.create();
const CB_ENDPOINT = import.meta.env.DEV == true ? 'http://localhost:8090' : 'http://localhost:8090';
const $coderbot = new CoderBot(CB_ENDPOINT, $axios, store);
const $coderbot = new CoderBot(import.meta.env.VITE_CB_ENDPOINT, $axios, store);

// this will block until CoderBot returns several configuration data.
$coderbot.load().then(() => {
Expand Down