Write on the margins of the internet. Powered by the AT Protocol.

fix

+6 -3
+4 -2
web/astro.config.mjs
··· 4 4 import tailwind from "@astrojs/tailwind"; 5 5 import node from "@astrojs/node"; 6 6 7 + const API_PORT = process.env.API_PORT || 8081; 8 + 7 9 // https://astro.build/config 8 10 export default defineConfig({ 9 11 adapter: node({ mode: "standalone" }), ··· 19 21 server: { 20 22 proxy: { 21 23 "/api": { 22 - target: "http://localhost:8080", 24 + target: `http://localhost:${API_PORT}`, 23 25 changeOrigin: true, 24 26 }, 25 27 "/auth": { 26 - target: "http://localhost:8080", 28 + target: `http://localhost:${API_PORT}`, 27 29 changeOrigin: true, 28 30 }, 29 31 },
+2 -1
web/src/middleware.ts
··· 1 1 import type { APIContext } from "astro"; 2 2 3 - const API_URL = process.env.API_URL || "http://localhost:8081"; 3 + const API_PORT = process.env.API_PORT || 8081; 4 + const API_URL = process.env.API_URL || `http://localhost:${API_PORT}`; 4 5 5 6 const PROXY_PATHS = ["/api/", "/auth/", "/client-metadata.json", "/jwks.json"]; 6 7