nestjs-myblog
π NestJS + TypeORM + MySQL + Bonus: Swagger
νμΌ νμκΈ°
μ΅μ’ λ²μ λ€μ΄λ‘λ (.zip)- login.dto.ts
- index.ts
- jwt-auth.guard.ts
- local-auth.guard.ts
- index.ts
- jwt.strategy.ts
- local.strategy.ts
- auth.controller.ts
- auth.module.ts
- auth.service.ts
- auth.decorator.ts
- index.ts
- user.decorator.ts
- enumToString.ts
- constants.ts
- database.config.ts
- 1601496082909-initialState.ts
- create-post.dto.ts
- edit-post.dto.ts
- index.ts
- index.ts
- post.entity.ts
- index.ts
- post-category.enum.ts
- post.controller.ts
- post.module.ts
- post.service.ts
- generate-typeorm-config-file.ts
- index.ts
- set-default-user.ts
- create-user.dto.ts
- edit-user.dto.ts
- index.ts
- user-registration.dto.ts
- index.ts
- user.entity.ts
- user.controller.ts
- user.module.ts
- user.service.ts
- app.controller.ts
- app.module.ts
- app.roles.ts
- app.service.ts
- app.swagger.ts
- main.ts
- app.e2e-spec.ts
- jest-e2e.json
- .env.sample
- .eslintrc.js
- .gitignore
- .prettierrc
- docker-compose.yml
- nest-cli.json
- package.json
- Procfile
- README.md
- tsconfig.build.json
- tsconfig.json
- yarn.lock
# μ€μΉ κ°μ΄λ
1. μ½λ λ΄λ €λ°κΈ°
git clone https://github.com/ruslanguns/nestjs-myblog
κΉνλΈμμ νλ‘μ νΈ μ½λ μ 체λ₯Ό λ΄ μ»΄ν¨ν°λ‘ λ΄λ €λ°μ΅λλ€.
cd nestjs-myblog
λ°©κΈ λ΄λ €λ°μ νλ‘μ νΈ ν΄λ μμΌλ‘ μ΄λν©λλ€.
2. Docker
μ¬μ μΆμ²μ¬μ μ€λΉλ¬Ό
- Git GitHubμμ νλ‘μ νΈ μ½λλ₯Ό λ΄λ €λ°μΌλ €λ©΄ νμν©λλ€.
- Docker Desktop 컨ν μ΄λλ₯Ό λΉλνκ³ μ€ννλ €λ©΄ νμν©λλ€. μ€μΉ ν μ€νν΄μ λ°±κ·ΈλΌμ΄λμ μΌλμΈμ.
docker compose up -d --build
μ μλ λͺ¨λ 컨ν μ΄λ(μλ², DB λ±)λ₯Ό ν λ²μ λΉλνκ³ λ°±κ·ΈλΌμ΄λμμ μ€νν©λλ€.
ν°λ―Έλμ docker compose ps λ₯Ό μ
λ ₯ν΄ μ»¨ν
μ΄λλ€μ΄ Up μνμΈμ§ νμΈνμΈμ. READMEμ ν¬νΈ λ²νΈκ° μ νμλ€λ©΄ λΈλΌμ°μ μμ http://localhost:ν¬νΈλ²νΈ λ‘ μ μν΄λ³΄μΈμ.
3. Node.js
μ¬μμ¬μ μ€λΉλ¬Ό
$ npm install
package.jsonμ λͺ μλ λΌμ΄λΈλ¬λ¦¬λ€μ λ΄λ €λ°μ μ€μΉν©λλ€.
$ npm run start
κ°λ°/μ€ν μλ²λ₯Ό μΌλλ€.
$ npm run start:dev
κ°λ°/μ€ν μλ²λ₯Ό μΌλλ€.
$ npm run start:prod
κ°λ°/μ€ν μλ²λ₯Ό μΌλλ€.
$ npm run test
μ΄ λͺ λ Ήμ΄λ₯Ό ν°λ―Έλμ κ·Έλλ‘ μ λ ₯ν΄ μ€ννμΈμ.
λͺ
λ Ήμ΄ μ€ν ν ν°λ―Έλμ λνλλ μ£Όμ(λ³΄ν΅ http://localhost:3000 νν)λ₯Ό λΈλΌμ°μ μμ μ΄μ΄λ³΄μΈμ.
μ΄ λ ν¬μ READMEμ μ ν μ€μ λͺ λ Ήμ΄λ₯Ό κ·Έλλ‘ κ°μ Έμμ΅λλ€.
// repository documentation
Was this content helpful?
(0 ratings)
