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