Skip to content
项目

关于

NestJS + Next.js sample application / Backend and Frontend use only TypeScript!!!

网站与应用开发

这些数字如何统计

实测星标增长

24小时
0
7天
正在收集历史
15天
正在收集历史
1个月
正在收集历史

各周期内的星标净变化,周期相互重叠,并非每日新增。缺失的测量保持空白。星标代表关注度,不代表软件质量。

README.md

原文

This project use only TypeScript!!

Tech stack

  • Backend
    • NestJS
    • Prisma
    • GraphQL
  • Frontend
    • Next.js / React
    • GraphQL Code Generator
    • Apollo Client
    • Semantic UI
    • emotion
  • Other
    • yarn workspace
    • ESLint / Prettier / husky
    • Docker / Docker Compose
    • Vercel
    • GCP (CloudSQL / Cloud Run / Cloud Build)

Getting Started

Docker

You can launch the development environment with one command!

docker-compose up

After successful launch, go to the following URL in your browser!

:warning: Containers have dependencies, but the next container may start to be started before the preparation is complete. If it fails for that reason, please specify the start-up separately as follows.

docker-compose up mysql

See docker-compose.yaml if you want to know more.

Local

  1. Prepare MySQL and create a database for development. Then create file packages/backend/.env and fill in the environment variables.
DATABASE_URL="mysql://username:password@localhost:3306/nest_next_sample"
  1. Do a database migration.
cd packages/backend
yarn install
yarn migrate:deploy
  1. Run the startup command for backend.
yarn start:dev

After successful launch, go to http://localhost:3300/graphql in your browser!

  1. Create file packages/frontend/.env and fill in the environment variables.
SERVER_APOLLO_URI="http://localhost:3300"
PUBLIC_APOLLO_URI="http://localhost:3300"
  1. Run the startup command for frontend.
cd packages/frontend
yarn dev

After successful launch, go to http://localhost:3000 in your browser!

GraphQL exmaple

mutation {
  saveTask(task: { title: "test", categoryIds: [] }) {
    id
    title
    categories {
      id
      name
      color
    }
  }
}
query {
  task(id: 1) {
    id
    title
    taskContents {
      id
      checked
    }
    categories {
      id
      name
    }
  }
}

探索相关项目

加载中…