ajout de variables env dans le nuxt.config pour les url

This commit is contained in:
Valentin 2024-02-21 01:21:11 +01:00
parent f94e7681bf
commit 605aef6513
2 changed files with 4 additions and 4 deletions

View File

@ -9,7 +9,7 @@
const { getItems } = useDirectusItems();
const global = ref([]);
onMounted(async () => {
const items = await getItems({ collection: "Global" });
const items = await getItems({ collection: "global" });
global.value = items;
});

View File

@ -9,17 +9,17 @@ export default defineNuxtConfig({
pageTransition: { name: 'page', mode: 'out-in' }
},
site: {
url: 'https://localhost:3000',
url: process.env.URL,
defaultLocale: 'fr',
name: 'Mahée Auffret',
description: 'Portfolio de l\'artiste-peintre basée à Rennes Mahée Auffret'
},
directus: {
url: "http://localhost:8055/",
url: process.env.DIRECTUS_URL,
token: process.env.DIRECTUS_API_TOKEN
},
image: {
domains: ['http://localhost:8055/'],
domains: [ `${process.env.DIRECTUS_URL}` ],
format: ['webp'],
}
})