diff --git a/.env.example b/.env.example index aedf635..c2c445a 100644 --- a/.env.example +++ b/.env.example @@ -2,16 +2,16 @@ # Postgres connection string used by Prisma DATABASE_URL="postgresql://postgres:postgres@localhost:5432/superlist?schema=public" # Port the Hono server listens on -PORT=3000 +PORT=4100 # Comma separated list of origins allowed by CORS (the web dev server) -CORS_ORIGIN="http://localhost:5173" +CORS_ORIGIN="http://localhost:7153" # Secret used by BetterAuth to sign sessions BETTER_AUTH_SECRET="change-me-with-openssl-rand-base64-32" # Public URL of the API, used by BetterAuth -BETTER_AUTH_URL="http://localhost:3000" +BETTER_AUTH_URL="http://localhost:4100" # "development" enables pretty logs, "production" emits JSON NODE_ENV="development" # --- apps/web --- # Public URL of the API consumed by the frontend -VITE_API_URL="http://localhost:3000" +VITE_API_URL="http://localhost:4100" diff --git a/apps/api/.env.example b/apps/api/.env.example index 31b78a8..0c00185 100644 --- a/apps/api/.env.example +++ b/apps/api/.env.example @@ -1,6 +1,6 @@ DATABASE_URL="postgresql://postgres:postgres@localhost:5432/superlist?schema=public" -PORT=3000 -CORS_ORIGIN="http://localhost:5173" +PORT=4100 +CORS_ORIGIN="http://localhost:7153" BETTER_AUTH_SECRET="change-me-with-openssl-rand-base64-32" -BETTER_AUTH_URL="http://localhost:3000" +BETTER_AUTH_URL="http://localhost:4100" NODE_ENV="development" diff --git a/apps/web/.env.example b/apps/web/.env.example index 0b704ea..e062916 100644 --- a/apps/web/.env.example +++ b/apps/web/.env.example @@ -1 +1 @@ -VITE_API_URL="http://localhost:3000" +VITE_API_URL="http://localhost:4100" diff --git a/apps/web/src/lib/api-client.ts b/apps/web/src/lib/api-client.ts index bf2ea5f..a39c4ca 100644 --- a/apps/web/src/lib/api-client.ts +++ b/apps/web/src/lib/api-client.ts @@ -1,6 +1,6 @@ import { PROBLEM_CONTENT_TYPE, type ProblemDetails } from '@superlist/shared' -const baseUrl = import.meta.env.VITE_API_URL ?? 'http://localhost:3000' +const baseUrl = import.meta.env.VITE_API_URL ?? 'http://localhost:4100' /** Error thrown when the API answers with a RFC 9457 Problem Details payload. */ export class ApiError extends Error { diff --git a/apps/web/vite.config.ts b/apps/web/vite.config.ts index 901f0c9..fe7303e 100644 --- a/apps/web/vite.config.ts +++ b/apps/web/vite.config.ts @@ -20,6 +20,6 @@ export default defineConfig({ }, }, server: { - port: 5173, + port: 7153, }, })