nestjs(5)
-
[Errors] pm2 설치 후 실행이 안 됨
실행 환경: nest.js, aws ec2 npm install pm2 -g pm2를 설치 하였는데 계속해서 pm2가 실행이 되지 않았다. (무중단 배포 말고, 정말 pm2 자체 실행이 되지 않았음) 나의 경우, pm2 list 를 하고 나니 pm2 엔진이 작동이 되었고, pm2 start dist/main.js 로 nest 서버를 배포 할 수 있게 되었다.
2021.08.18 -
[Nest.js] redis 연동
ORM : Typeorm DB : postgresl, redis 프레임워크: Nest.js GO !!!!!! 먼저 redis를 연동 하기 전에 redis를 설치 해야 한다. $brew install redis 설치를 하고 난뒤, 그럼 아래 사진과 같이 뜬다. 이제 redis를 실행 해보자 redis-cli 를 입력 하면, redis에 접속이 된다. import * as redisStore from 'cache-manager-ioredis'; import { CacheModule } from '@nestjs/common'; @Module({ imports: [ CacheModule.register({ store: redisStore, host: 'localhost', port: 6379,// Redis의 ..
2021.08.10 -
[Nest.js] Swagger사용 방법
nest js 공식 문서에 OPEN API npm install --save @nestjs/swagger swagger-ui-express 설치 한다. main.ts에서 import { NestFactory } from '@nestjs/core'; import { DocumentBuilder, SwaggerModule } from '@nestjs/swagger'; import { AppModule } from './app.module'; async function bootstrap() { const app = await NestFactory.create(AppModule); const config = new DocumentBuilder() .setTitle('여기는 타이틀') .setDescription..
2021.07.30 -
[Nest.js] first step
공식문서를 바탕으로 작성 되었습니다. nest.js 를 사용 하기 위해 우선 git clone으로 구조를 clone 한다. clone 한 다음, 서버를 실행한다. 이제 clone한 디렉토리로 이동 해서 npm install을 하고 난뒤, 서버를 실행 해보자 npm run start ! 브라우저에서 localhost:3000 접속을 해보자 위와 같은 화면이 뜨면 서버가 정상적으로 실행이 된 것이다.
2021.07.20 -
[Errors] Nest can't resolve dependencies of the UsersService (?). Please make sure that the argument UsersRepository at index [0] is available in the UsersModule context.Potential solutions:- If UsersRepository is a provider, is it part of the current U..
Nest can't resolve dependencies of the UsersService (?). Please make sure that the argument UsersRepository at index [0] is available in the UsersModule context. Potential solutions: - If UsersRepository is a provider, is it part of the current UsersModule? - If UsersRepository is exported from a separate @Module, is that module imported within UsersModule? @Module({ imports: [ /* the Module con..
2021.07.15