From 3af3895a35bf43c5fe0b8cf7177b91a9c76d0970 Mon Sep 17 00:00:00 2001 From: sivertlv Date: Thu, 15 Oct 2026 22:22:13 +0200 Subject: [PATCH] fix(project): change backend port from 4000 to 3001 like in project requirements --- README.md | 4 ++-- apps/frontend/src/graphql/client.ts | 2 +- apps/frontend/src/routes/demo/todos.tsx | 4 ++-- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/README.md b/README.md index 34bcc64..efb4e02 100644 --- a/README.md +++ b/README.md @@ -9,7 +9,7 @@ This project is a pnpm workspace monorepo: ```text apps/ frontend/ TanStack Start app (React + Vite, port 3000) - backend/ Apollo Server + GraphQL API (Pothos + Prisma, port 4000) + backend/ Apollo Server + GraphQL API (Pothos + Prisma, port 3001) packages/ db/ Prisma schema, generated client, migrations and seed ``` @@ -44,7 +44,7 @@ pnpm db:seed pnpm dev ``` -Frontend: http://localhost:3000 · GraphQL API: http://localhost:4000 +Frontend: http://localhost:3000 · GraphQL API: http://localhost:3001 ### Commands diff --git a/apps/frontend/src/graphql/client.ts b/apps/frontend/src/graphql/client.ts index bcaba9a..3772097 100644 --- a/apps/frontend/src/graphql/client.ts +++ b/apps/frontend/src/graphql/client.ts @@ -1,4 +1,4 @@ -const GRAPHQL_URL = import.meta.env.VITE_GRAPHQL_URL ?? 'http://localhost:4000/' +const GRAPHQL_URL = import.meta.env.VITE_GRAPHQL_URL ?? 'http://localhost:3001/' interface GraphQLResponse { data?: T diff --git a/apps/frontend/src/routes/demo/todos.tsx b/apps/frontend/src/routes/demo/todos.tsx index c83ed46..695468d 100644 --- a/apps/frontend/src/routes/demo/todos.tsx +++ b/apps/frontend/src/routes/demo/todos.tsx @@ -85,7 +85,7 @@ function DemoTodos() { {isError && (

Failed to load todos: {error.message}. Is the GraphQL backend - running on http://localhost:4000? + running on http://localhost:3001?

)} @@ -127,7 +127,7 @@ function DemoTodos() { Powered by GraphQL + Apollo Server

- The frontend queries the GraphQL backend on port 4000, which uses + The frontend queries the GraphQL backend on port 3001, which uses Prisma to talk to PostgreSQL