전체 글

컴퓨터 공부하는 블로그입니다. 공부하는거 다 적어요~!
Documentation | NestJS - A progressive Node.js frameworkNest is a framework for building efficient, scalable Node.js server-side applications. It uses progressive JavaScript, is built with TypeScript and combines elements of OOP (Object Oriented Programming), FP (Functional Programming), and FRP (Functional Readocs.nestjs.com Pipe란?Pipe란 @Injectable() 로 데코레이팅된 클래스로,  PipeTransform 인터페이스를 impleme..
To Do(버전 및 환경 정리하기!)1. resource 생성** app.module.ts에 AuthModule이 잘 추가됐는지 확인해야함!(아래와 비슷한 느낌으로!)import { Module } from '@nestjs/common';import { AppController } from './app.controller';import { AppService } from './app.service';import { TypeOrmModule } from '@nestjs/typeorm';import { AuthModule } from './auth/auth.module';@Module({ imports: [ TypeOrmModule.forRoot({ ... }), AuthModule,..
펫시터 프로젝트를 진행하면서 이메일 인증을 통한 회원가입을 구현했다.심심한 회원가입을 좀 더 특별하게 만들어주고 싶었기에 시작했다.먼저 사용자에게 mail을 보내야하기에 Nodemailer 모듈을 사용했다.   Nodemailer :: NodemailerNodemailer Nodemailer is a module for Node.js applications to allow easy as cake email sending. The project got started back in 2010 when there was no sane option to send email messages, today it is the solution most Node.js users turn to by default. npm i..
문제상황펫시터 웹사이트를 구현하며 카카오톡 로그인을 넣기로 했다. 그러나 우리의 프로젝트는 res.session에 있는 user 값을 res.locals에 저장해, 유저의 로그인 유무를 판단했다. login = async (req, res, next) => { try { const { email, password } = req.body; if (!email || !password) { throw new customError( 400, "Bad Request", "아이디 / 비밀번호를 입력해주세요." ); } const responseFromService = await this.authSer..
과제를 하며 내가 작성했던 에러 처리 코드는 다음과 같다.  signup = async (req, res, next) => { try { const { email, name, password, passwordCheck } = req.body; if (password !== passwordCheck) { return res.status(400).json( response({ status: 400, message: "비밀번호가 일치하지 않습니다." }) ); } ... } catch (error) { next(error); } }; 모든 응답을 re..
전호영
컴퓨터 공부하는 블로그