diff --git a/components/ArtistListItem.vue b/components/ArtistListItem.vue
index 9fdc094..74b34f6 100644
--- a/components/ArtistListItem.vue
+++ b/components/ArtistListItem.vue
@@ -1,19 +1,21 @@
-
{{ runningOrder }}
+
{{ runningOrder }}
{{ country }}
-
- {{ artist }}
+
+ {{ artist }}
{{ title }}
-

+
diff --git a/nuxt.config.ts b/nuxt.config.ts
index 99db335..ee3e67d 100644
--- a/nuxt.config.ts
+++ b/nuxt.config.ts
@@ -15,4 +15,9 @@ export default defineNuxtConfig({
vite: {
plugins: [tailwindcss() as any],
},
+ runtimeConfig: {
+ public: {
+ apiBase: process.env.API_BASE || 'http://localhost:8000',
+ },
+ },
})
\ No newline at end of file
diff --git a/package.json b/package.json
index 5cd095b..0bb1dbd 100644
--- a/package.json
+++ b/package.json
@@ -21,5 +21,19 @@
"vue": "^3.5.13",
"vue-router": "^4.5.1"
},
- "packageManager": "pnpm@10.5.2+sha512.da9dc28cd3ff40d0592188235ab25d3202add8a207afbedc682220e4a0029ffbff4562102b9e6e46b4e3f9e8bd53e6d05de48544b0c57d4b0179e22c76d1199b"
+ "packageManager": "pnpm@10.5.2+sha512.da9dc28cd3ff40d0592188235ab25d3202add8a207afbedc682220e4a0029ffbff4562102b9e6e46b4e3f9e8bd53e6d05de48544b0c57d4b0179e22c76d1199b",
+ "pnpm": {
+ "ignoredBuiltDependencies": [
+ "@parcel/watcher",
+ "esbuild",
+ "sharp",
+ "unrs-resolver"
+ ],
+ "onlyBuiltDependencies": [
+ "@parcel/watcher",
+ "esbuild",
+ "sharp",
+ "unrs-resolver"
+ ]
+ }
}
diff --git a/pages/index.vue b/pages/index.vue
index eb99a53..f5a3d48 100644
--- a/pages/index.vue
+++ b/pages/index.vue
@@ -6,7 +6,7 @@ const { data: participants } = await useFetch('/api/participants')
diff --git a/server/api/participants.get.ts b/server/api/participants.get.ts
index 150c437..c15875d 100644
--- a/server/api/participants.get.ts
+++ b/server/api/participants.get.ts
@@ -1,30 +1,9 @@
-export default defineEventHandler((event) => {
- return [
- {
- id: 1,
- year: 2025,
- country: "Suomi",
- artist: "Käärijä",
- title: "Cha Cha Cha",
- runningOrder: 1,
- lyricsOriginal: "Original lyrics",
- lyricsTranslationFI: "Käännös suomeksi",
- tags: [],
- img: "https://via.placeholder.com/150",
- flag: "fin"
- },
- {
- id: 2,
- year: 2025,
- country: "Ruotsi",
- artist: "Loreen",
- title: "Loreen",
- runningOrder: 2,
- lyricsOriginal: "Original lyrics",
- lyricsTranslationFI: "Käännös suomeksi",
- tags: [],
- img: "https://via.placeholder.com/150",
- flag: "swe"
- },
- ]
+export default defineEventHandler(async (event) => {
+ const config = useRuntimeConfig(event)
+ const apiBase = config.public.apiBase
+
+ const response = await $fetch(`${apiBase}/songs`)
+
+ return response
+
})
\ No newline at end of file
diff --git a/server/api/user.get.ts b/server/api/user.get.ts
new file mode 100644
index 0000000..0c153ba
--- /dev/null
+++ b/server/api/user.get.ts
@@ -0,0 +1,8 @@
+export default defineEventHandler(async (event) => {
+ return {
+ id: 1,
+ avatar: 0,
+ username: 'Kalle',
+
+ }
+})
\ No newline at end of file