diff --git a/.env.development b/.env.development new file mode 100644 index 0000000..a117331 --- /dev/null +++ b/.env.development @@ -0,0 +1,7 @@ +JWT_SECRET="2b343f1ffd059864aecfeb590a973e8e29c5914b6a30d1245ad1ef2e0c280c47" +JWT_EXPIRATION_MS=60000 +JWT_REFRESH_EXPIRATION_MS=1209600000 +REFRESH_DOMAIN="/refresh" +FRONTEND_DOMAIN="http://localhost:3000" +BACKEND_DOMAIN="https://meetmate.bencodes.de" +GRAPHQL_URL="http://localhost:8080/graphql" diff --git a/.env.local b/.env.production similarity index 100% rename from .env.local rename to .env.production diff --git a/src/lib/actions.ts b/src/lib/actions.ts index f3beafd..e4134e5 100644 --- a/src/lib/actions.ts +++ b/src/lib/actions.ts @@ -78,7 +78,7 @@ export async function refreshAccessToken() { // eslint-disable-next-line @typescript-eslint/no-redundant-type-constituents export async function getUser(): Promise { try { - const response = await fetch("http://localhost:3000/api/user/get", { + const response = await fetch(process.env.FRONTEND_DOMAIN + "/api/user/get", { method: "GET", headers: { "Content-Type": "application/json;charset=UTF-8",