diff --git a/.env.development b/.env.development new file mode 100644 index 0000000..4046146 --- /dev/null +++ b/.env.development @@ -0,0 +1,2 @@ +VUE_APP_BASE_URL=http://localhost:8000/ +VUE_APP_NAME=Bobby \ No newline at end of file diff --git a/.env.production b/.env.production new file mode 100644 index 0000000..ceb4f76 --- /dev/null +++ b/.env.production @@ -0,0 +1,2 @@ +VUE_APP_BASE_URL=https://perudo.loken.nl/ +VUE_APP_NAME= \ No newline at end of file diff --git a/deploy.sh b/deploy.sh new file mode 100755 index 0000000..73aa196 --- /dev/null +++ b/deploy.sh @@ -0,0 +1,3 @@ +#!/usr/bin/sh +npm run build +scp -r dist/* www-data@cemophora:/var/www/perudo-client.loken.nl/ diff --git a/src/services/PerudoApi.ts b/src/services/PerudoApi.ts index f786858..7dddbd5 100644 --- a/src/services/PerudoApi.ts +++ b/src/services/PerudoApi.ts @@ -2,7 +2,7 @@ import axios, {AxiosPromise, AxiosResponse} from 'axios' import {JoinCreateGameObject, IsStartedObject, ApiObject, GameStateObject, MyTurnObject, GuessAction} from "@/objects/objects"; export default class PerudoApi { - private static baseUrl = 'http://localhost:8000/' + private static baseUrl = process.env.VUE_APP_BASE_URL; private static objectInstance?: PerudoApi; diff --git a/src/views/Home.vue b/src/views/Home.vue index fccf069..ddc9ccc 100644 --- a/src/views/Home.vue +++ b/src/views/Home.vue @@ -112,7 +112,7 @@ export default class Home extends Vue { private gameStateObject: GameStateObject | null = null; private error: string | null = null; - private name: string = 'Bobby'; + private name: string = process.env.VUE_APP_NAME; private code: string = ''; private owner: boolean = false;