From 9cc1f83dc0070e8c14e6f0df6fba5632a548af94 Mon Sep 17 00:00:00 2001 From: Ruidy Date: Sat, 27 Apr 2024 03:18:35 +0200 Subject: [PATCH] faetch from api --- TODO.md | 1 + nuxt.config.ts | 7 +++++++ pages/random.vue | 14 +++++++++++++- 3 files changed, 21 insertions(+), 1 deletion(-) diff --git a/TODO.md b/TODO.md index 1ee77ba..7ecedda 100644 --- a/TODO.md +++ b/TODO.md @@ -7,6 +7,7 @@ - [ ] deploy - [ ] nuxt image - [x] prettier and eslint +- [ ] transition - [ ] pwa - [ ] seo, robots.txt - [ ] update the README diff --git a/nuxt.config.ts b/nuxt.config.ts index baa09bd..06f85e7 100644 --- a/nuxt.config.ts +++ b/nuxt.config.ts @@ -9,4 +9,11 @@ export default defineNuxtConfig({ autoprefixer: {}, }, }, + runtimeConfig: { + // The private keys which are only available server-side + apiUrl: process.env.API_URL, + // Keys within public are also exposed client-side + public: {}, + }, + ssr: true, }); diff --git a/pages/random.vue b/pages/random.vue index ebf0889..bc3ae92 100644 --- a/pages/random.vue +++ b/pages/random.vue @@ -1,3 +1,15 @@ + +