ajout du fichier de route

This commit is contained in:
mrtoine 2025-10-01 14:42:59 +02:00
parent c851865728
commit ef1ba911d9
4 changed files with 125 additions and 27 deletions

View file

@ -1,5 +1,10 @@
async function getProjects() {
const res = await fetch("http://127.0.0.1:5000/api/projects/", {
const baseUrl = process.env.BACKEND_URL;
if (!baseUrl) {
throw new Error("Variable d'environnement BACKEND_URL manquante");
}
const res = await fetch(`${baseUrl}/projects/`, {
cache: "no-store",
});