feat: configure ports, db url and api url with env variables

This commit is contained in:
Elias Schneider
2023-04-25 23:39:57 +02:00
parent b33c1d7f4b
commit e5071cba12
6 changed files with 17 additions and 8 deletions

View File

@@ -22,7 +22,7 @@ export async function middleware(request: NextRequest) {
// Get config from backend
const config = await (
await fetch("http://localhost:8080/api/configs")
await fetch(`${request.nextUrl.origin}/api/configs`)
).json();
const getConfig = (key: string) => {