Skip to content
Snippets Groups Projects
Verified Commit 958b97a8 authored by Daniel Göbel's avatar Daniel Göbel
Browse files

Load API URL from env variable and restructure gitlab CI

#2
parent 4967e4e5
No related branches found
No related tags found
2 merge requests!22Version 1.0.0,!1HTTP Client and Login
image: node:16 image: node:16
cache: cache:
paths: paths:
- dist
- node_modules - node_modules
stages: stages:
- prepare
- test - test
- build - build
prepare: before_script:
stage: prepare - npm --version # For debugging
script: - npm install
- npm install
lint: lint:
stage: test stage: test
needs:
- prepare
script: script:
- npm run lint - npm run lint
- npm run type-check - npm run type-check
build: build:
stage: build stage: build
needs:
- prepare
script: script:
- npm run build-only - npm run build-only
artifacts: artifacts:
......
...@@ -19,7 +19,7 @@ export type OpenAPIConfig = { ...@@ -19,7 +19,7 @@ export type OpenAPIConfig = {
}; };
export const OpenAPI: OpenAPIConfig = { export const OpenAPI: OpenAPIConfig = {
BASE: 'http://localhost:9999/api', BASE: import.meta.env.VITE_API_BASE_URL != null ? import.meta.env.VITE_API_BASE_URL : 'http://localhost:9999/api',
VERSION: '1.0.0', VERSION: '1.0.0',
WITH_CREDENTIALS: false, WITH_CREDENTIALS: false,
CREDENTIALS: 'include', CREDENTIALS: 'include',
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment