nestJS structure & google gmail authentication
@nestjs/mongoose mongoose
@nestjs/graphql @nestjs/apollo graphql apollo-server-express
@nestjs/mongoose mongoose
Node.js framework NestJS project structure
- Create a
.env
file- Rename the .env.sample file to
.env
to fix it.
- Rename the .env.sample file to
- Edit env config
- Edit the file in the config folder.
default
,development
,production
,test
# 1. node_modules
pnpm ci
# 1-1. npm < v7 or Node.js <= v14
pnpm i
# 2. When synchronize database from existing entities
pnpm run entity:sync
# 2-1. When import entities from an existing database
pnpm run entity:load
If you use multiple databases in entity:load
, modify them.
npm run dev
# https://docs.nestjs.com/recipes/repl
npm run start:repl
pnpm test # exclude e2e
pnpm run test:e2e
pnpm run lint
pnpm run build
# define environment variable yourself.
# NODE_ENV=production PORT=8000 NO_COLOR=true node dist/app
node dist/app
# OR
pnpm start