ajout de variables env dans le nuxt.config pour les url
This commit is contained in:
parent
f94e7681bf
commit
605aef6513
2
app.vue
2
app.vue
|
@ -9,7 +9,7 @@
|
||||||
const { getItems } = useDirectusItems();
|
const { getItems } = useDirectusItems();
|
||||||
const global = ref([]);
|
const global = ref([]);
|
||||||
onMounted(async () => {
|
onMounted(async () => {
|
||||||
const items = await getItems({ collection: "Global" });
|
const items = await getItems({ collection: "global" });
|
||||||
global.value = items;
|
global.value = items;
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|
|
@ -9,17 +9,17 @@ export default defineNuxtConfig({
|
||||||
pageTransition: { name: 'page', mode: 'out-in' }
|
pageTransition: { name: 'page', mode: 'out-in' }
|
||||||
},
|
},
|
||||||
site: {
|
site: {
|
||||||
url: 'https://localhost:3000',
|
url: process.env.URL,
|
||||||
defaultLocale: 'fr',
|
defaultLocale: 'fr',
|
||||||
name: 'Mahée Auffret',
|
name: 'Mahée Auffret',
|
||||||
description: 'Portfolio de l\'artiste-peintre basée à Rennes Mahée Auffret'
|
description: 'Portfolio de l\'artiste-peintre basée à Rennes Mahée Auffret'
|
||||||
},
|
},
|
||||||
directus: {
|
directus: {
|
||||||
url: "http://localhost:8055/",
|
url: process.env.DIRECTUS_URL,
|
||||||
token: process.env.DIRECTUS_API_TOKEN
|
token: process.env.DIRECTUS_API_TOKEN
|
||||||
},
|
},
|
||||||
image: {
|
image: {
|
||||||
domains: ['http://localhost:8055/'],
|
domains: [ `${process.env.DIRECTUS_URL}` ],
|
||||||
format: ['webp'],
|
format: ['webp'],
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
|
|
Loading…
Reference in New Issue