Skip to content

Latest commit

 

History

4 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 

Repository files navigation

TweetQL

GraphQL을 사용한 트위터 클론 프로젝트입니다. Apollo Server와 Prisma를 사용하여 구현되었습니다.

기술 스택

  • Node.js
  • Apollo Server
  • GraphQL
  • Prisma (PostgreSQL)
  • Neon (Serverless PostgreSQL)

시작하기

필수 조건

  • Node.js (v16 이상)
  • npm 또는 yarn
  • PostgreSQL 데이터베이스 (Neon 사용)

설치

  1. 저장소 클론
git clone [repository-url]
cd tweetql
  1. 의존성 설치
npm install
  1. 환경 변수 설정 .env 파일을 생성하고 다음 내용을 추가합니다:
DATABASE_URL="your-database-url"
  1. 데이터베이스 마이그레이션
npx prisma migrate dev
  1. 시드 데이터 추가 (선택사항)
npm run prisma:seed

개발 서버 실행

npm run dev

서버가 http://localhost:4000 에서 실행됩니다.

GraphQL API

Queries

  • me: 현재 로그인한 사용자 정보 조회
  • tweets: 모든 트윗 조회
  • tweet(id: ID!): 특정 트윗 조회

Mutations

  • postTweet(text: String!): 새 트윗 작성
  • deleteTweet(id: ID!): 트윗 삭제

데이터 모델

User

  • id: ID
  • username: String
  • email: String
  • tweets: [Tweet]
  • createdAt: DateTime
  • updatedAt: DateTime

Tweet

  • id: ID
  • text: String
  • author: User
  • authorId: String
  • createdAt: DateTime
  • updatedAt: DateTime

라이선스

ISC

About

No description, website, or topics provided.

Resources

Stars

0 stars

Watchers

1 watching

Forks

Releases

Packages

Used by

Contributors

Languages