Apollo server(TypeScript) + PostgreSQL + Docker 백엔드 환경 구성하기

곽태욱·2022년 6월 1일
0

개발 환경

  • macOS 11.5
  • Node.js 18.2
  • Yarn 3.2
  • Git 2.36
  • Docker 20.10

설치 과정

mkdir backend && cd backend
git init

.gitignore
https://www.toptal.com/developers/gitignore/api/node

Yarn 3
https://yarnpkg.com/getting-started/install
https://yarnpkg.com/getting-started/recipes
https://yarnpkg.com/cli/upgrade-interactive

package.json
https://docs.npmjs.com/cli/v8/configuring-npm/package-json

TypeScript
https://www.typescriptlang.org/download

tsconfig.json (Node.js 18)
https://stackoverflow.com/questions/72380007/what-typescript-configuration-produces-output-closest-to-node-js-18-capabilities/72380008#72380008

ESLint
https://eslint.org/docs/user-guide/getting-started

Prettier
https://prettier.io/docs/en/install.html

ESLint + Prettier
https://github.com/prettier/eslint-config-prettier

Yarn 3 + VSCode + ESLint + Prettier
https://yarnpkg.com/getting-started/editor-sdks

Husky
https://typicode.github.io/husky/#/?id=usage

PostgreSQL Client
https://node-postgres.com/

Apollo Server + Express
https://www.apollographql.com/docs/apollo-server/integrations/middleware

GraphQL Scalars
https://www.graphql-scalars.dev/docs/quick-start

GraphQL Codegen
https://www.graphql-code-generator.com/docs/getting-started/installation

esbuild
https://esbuild.github.io/getting-started/

Nodemon + esbuild watch + GraphQL Codegen watch
(Input rs on terminal after yarn dev on the first try)
https://github.com/remy/nodemon#nodemon
https://stackoverflow.com/a/35455532/16868717
https://www.graphql-code-generator.com/docs/config-reference/codegen-config#configuration-options

Dockerfile
https://docs.docker.com/engine/reference/builder/
https://hub.docker.com/_/node

docker-compose.yml
https://docs.docker.com/compose/compose-file/

Jest
https://jestjs.io/docs/getting-started

profile
이유와 방법을 알려주는 메모장 겸 블로그. 블로그 내용에 대한 토의나 질문은 언제나 환영합니다.

0개의 댓글