Skip to content

wkylin/hackernews-react-apollo

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

8 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

HackerNews React Apollo

Full-stack Hacker News clone split into separate frontend and backend packages.

Structure

frontend/  React 19 + Vite + Apollo Client
server/    GraphQL Yoga + Prisma ORM + MySQL

Install

pnpm install

Frontend

pnpm dev:frontend
pnpm build:frontend
pnpm preview:frontend

Vite loads the GraphQL endpoint from mode-specific env files:

  • local dev: frontend/.env.development -> http://localhost:4000
  • production build: frontend/.env.production -> https://api.wkylin.cn

The production frontend domain is https://hacker.wkylin.cn.

Backend

Create server/.env from server/.env.example, then run:

pnpm prisma:generate
pnpm prisma:push
pnpm dev:server

The backend listens on http://localhost:4000 locally and is intended to run behind https://api.wkylin.cn in production.

Deployment examples are in deploy/.

About

react graphql apollo prisma...

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages