Add deploy script and move some vars to env file for prod and local
This commit is contained in:
parent
019f359854
commit
46ee666437
2
.env.development
Normal file
2
.env.development
Normal file
@ -0,0 +1,2 @@
|
|||||||
|
VUE_APP_BASE_URL=http://localhost:8000/
|
||||||
|
VUE_APP_NAME=Bobby
|
2
.env.production
Normal file
2
.env.production
Normal file
@ -0,0 +1,2 @@
|
|||||||
|
VUE_APP_BASE_URL=https://perudo.loken.nl/
|
||||||
|
VUE_APP_NAME=
|
3
deploy.sh
Executable file
3
deploy.sh
Executable file
@ -0,0 +1,3 @@
|
|||||||
|
#!/usr/bin/sh
|
||||||
|
npm run build
|
||||||
|
scp -r dist/* www-data@cemophora:/var/www/perudo-client.loken.nl/
|
@ -2,7 +2,7 @@ import axios, {AxiosPromise, AxiosResponse} from 'axios'
|
|||||||
import {JoinCreateGameObject, IsStartedObject, ApiObject, GameStateObject, MyTurnObject, GuessAction} from "@/objects/objects";
|
import {JoinCreateGameObject, IsStartedObject, ApiObject, GameStateObject, MyTurnObject, GuessAction} from "@/objects/objects";
|
||||||
|
|
||||||
export default class PerudoApi {
|
export default class PerudoApi {
|
||||||
private static baseUrl = 'http://localhost:8000/'
|
private static baseUrl = process.env.VUE_APP_BASE_URL;
|
||||||
|
|
||||||
private static objectInstance?: PerudoApi;
|
private static objectInstance?: PerudoApi;
|
||||||
|
|
||||||
|
@ -112,7 +112,7 @@ export default class Home extends Vue {
|
|||||||
private gameStateObject: GameStateObject | null = null;
|
private gameStateObject: GameStateObject | null = null;
|
||||||
private error: string | null = null;
|
private error: string | null = null;
|
||||||
|
|
||||||
private name: string = 'Bobby';
|
private name: string = process.env.VUE_APP_NAME;
|
||||||
private code: string = '';
|
private code: string = '';
|
||||||
private owner: boolean = false;
|
private owner: boolean = false;
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user