Skip to content

Commit

Permalink
🐛 Fix API route not found (#73)
Browse files Browse the repository at this point in the history
  • Loading branch information
colinlienard authored Sep 22, 2023
1 parent cab25b3 commit 6cc1e4e
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 2 deletions.
4 changes: 3 additions & 1 deletion components/SpotifyListening.vue
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
<script setup lang="ts">
const { data: music, refresh } = await useFetch('/api/spotify-listening');
const { data: music, refresh } = await useFetch('/api/spotify-listening', {
server: false,
});
let interval: ReturnType<typeof setInterval> | null = null;
onMounted(() => {
Expand Down
7 changes: 6 additions & 1 deletion nuxt.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,12 @@ export default defineNuxtConfig({
enabled: true,
},
modules: ['@nuxt/content'],
nitro: {
prerender: {
crawlLinks: true,
routes: ['/'],
},
},
runtimeConfig: {
spotifyClientId: '',
spotifyClientSecret: '',
Expand All @@ -23,7 +29,6 @@ export default defineNuxtConfig({
email: 'contact@colin-lienard.fr',
},
},
ssr: true,
typescript: {
strict: true,
},
Expand Down

1 comment on commit 6cc1e4e

@vercel
Copy link

@vercel vercel bot commented on 6cc1e4e Sep 22, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please sign in to comment.