Amend env var stubs
This commit is contained in:
@@ -13,9 +13,7 @@ EOF
|
|||||||
|
|
||||||
# Generate nginx config from template (if using)
|
# Generate nginx config from template (if using)
|
||||||
if [ -f "/etc/nginx/templates/nginx.conf.template" ]; then
|
if [ -f "/etc/nginx/templates/nginx.conf.template" ]; then
|
||||||
envsubst '${API_HOST} ${API_PORT}' \
|
envsubst '${API_HOST} ${API_PORT}' < /etc/nginx/templates/nginx.conf.template > /etc/nginx/nginx.conf
|
||||||
< /etc/nginx/templates/nginx.conf.template \
|
|
||||||
> /etc/nginx/nginx.conf
|
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# Start Nginx
|
# Start Nginx
|
||||||
|
|||||||
@@ -139,12 +139,12 @@ router.beforeEach(async (to) => {
|
|||||||
app.use(router);
|
app.use(router);
|
||||||
app.use(ToastService)
|
app.use(ToastService)
|
||||||
|
|
||||||
let apiUrl = getApiUrl();
|
let apiUrl: string | undefined
|
||||||
|
|
||||||
if (!apiUrl) {
|
if (!getApiUrl()) {
|
||||||
apiUrl = `http://${apiUrl}`
|
apiUrl = `http://${getApiUrl()}`
|
||||||
} else {
|
} else {
|
||||||
apiUrl = ''
|
apiUrl = "http://localhost:7070"
|
||||||
}
|
}
|
||||||
|
|
||||||
const axiosInstance = axios.create({
|
const axiosInstance = axios.create({
|
||||||
@@ -173,6 +173,7 @@ axiosInstance.interceptors.response.use(
|
|||||||
}
|
}
|
||||||
)
|
)
|
||||||
|
|
||||||
|
console.log(apiUrl)
|
||||||
const deckService: DeckService = new DeckService(undefined, undefined, axiosInstance)
|
const deckService: DeckService = new DeckService(undefined, undefined, axiosInstance)
|
||||||
const cardService: CardService = new CardService(undefined, undefined, axiosInstance)
|
const cardService: CardService = new CardService(undefined, undefined, axiosInstance)
|
||||||
const setService: SetService = new SetService(undefined, undefined, axiosInstance)
|
const setService: SetService = new SetService(undefined, undefined, axiosInstance)
|
||||||
|
|||||||
Reference in New Issue
Block a user