- Sort
Dashboard
@@ -397,6 +401,7 @@
isFetchManual={true}
duration={item.durations}
instructorId={item.instructorID}
+ image_card={item.thumbnail_path}
/>
{/each}
diff --git a/frontend/my-app/src/service.ts b/frontend/my-app/src/service.ts
index 921f83df..ddd32293 100644
--- a/frontend/my-app/src/service.ts
+++ b/frontend/my-app/src/service.ts
@@ -1,4 +1,19 @@
-export const apiBaseUrl: string = "http://localhost:7070/api/v1/"
+import { PUBLIC_API_BASE_URL_DEV, PUBLIC_API_BASE_URL_PROD, PUBLIC_API_BASE_URL_QA } from "$env/static/public";
+let apiBaseUrl: string;
+
+if (process.env.NODE_ENV === 'production') {
+ apiBaseUrl = PUBLIC_API_BASE_URL_PROD;
+} else if (process.env.NODE_ENV === 'development') {
+ apiBaseUrl = PUBLIC_API_BASE_URL_DEV;
+} else if (process.env.NODE_ENV === 'testing') {
+ apiBaseUrl = PUBLIC_API_BASE_URL_QA;
+} else {
+ apiBaseUrl = "http://localhost:9090/api/v1/";
+}
+console.log(process.env.NODE_ENV)
+export { apiBaseUrl };
+
+
export const BaseUrl: string = "http://localhost:3000/"
export const apiCurrencyExchange: string = "https://api.exchangerate-api.com/v4/latest/USD"
import axios, { type AxiosResponse } from 'axios';
diff --git a/frontend/my-app/svelte.config.js b/frontend/my-app/svelte.config.js
index 87f1a415..84ddb3e4 100644
--- a/frontend/my-app/svelte.config.js
+++ b/frontend/my-app/svelte.config.js
@@ -1,4 +1,4 @@
-import adapter from "@sveltejs/adapter-auto";
+import adapter from "@sveltejs/adapter-node";
import { vitePreprocess } from "@sveltejs/kit/vite";
/** @type {import('@sveltejs/kit').Config} */
@@ -7,6 +7,9 @@ const config = {
// for more information about preprocessors
preprocess: [vitePreprocess({})],
kit: {
+ env: {
+ dir: "./",
+ },
// adapter-auto only supports some environments, see https://kit.svelte.dev/docs/adapter-auto for a list.
// If your environment is not supported or you settled on a specific environment, switch out the adapter.
// See https://kit.svelte.dev/docs/adapters for more information about adapters.
diff --git a/frontend/my-app/tsconfig.json b/frontend/my-app/tsconfig.json
index 6ae0c8c4..7af4aa41 100644
--- a/frontend/my-app/tsconfig.json
+++ b/frontend/my-app/tsconfig.json
@@ -1,17 +1,18 @@
{
- "extends": "./.svelte-kit/tsconfig.json",
- "compilerOptions": {
- "allowJs": true,
- "checkJs": true,
- "esModuleInterop": true,
- "forceConsistentCasingInFileNames": true,
- "resolveJsonModule": true,
- "skipLibCheck": true,
- "sourceMap": true,
- "strict": true
- }
- // Path aliases are handled by https://kit.svelte.dev/docs/configuration#alias
- //
- // If you want to overwrite includes/excludes, make sure to copy over the relevant includes/excludes
- // from the referenced tsconfig.json - TypeScript does not merge them in
+ "extends": "./.svelte-kit/tsconfig.json",
+ "compilerOptions": {
+ "allowJs": true,
+ "checkJs": true,
+ "target": "ESNext",
+ "esModuleInterop": true,
+ "forceConsistentCasingInFileNames": true,
+ "resolveJsonModule": true,
+ "skipLibCheck": true,
+ "sourceMap": true,
+ "strict": true
+ }
+ // Path aliases are handled by https://kit.svelte.dev/docs/configuration#alias
+ //
+ // If you want to overwrite includes/excludes, make sure to copy over the relevant includes/excludes
+ // from the referenced tsconfig.json - TypeScript does not merge them in
}