inflearn logo
강의

강의

N
챌린지

챌린지

멘토링

멘토링

N
클립

클립

로드맵

로드맵

지식공유

묻고 답해요

174만명의 커뮤니티!! 함께 토론해봐요.

a태그 같은 위치에 정렬

미해결

HTML+CSS+JS 포트폴리오 실전 퍼블리싱(시즌1)

영상을 먼저 보고 스스로 해보는 중인데 before가상요소로 부여한 부분이 은근이 줄이 안 맞는 것 같아서요. 영상에서도 다른 텍스트들에 비해 아래쪽으로 나와있는데 위 사진에서 아래쪽으로 튀어나온 부분이 다른 텍스트들과 마찬가지로 중앙부분에 올 수 있도록 하는 방법은 무엇인가요? 저 파란부분 튀어나온 게 a부분 위아래로 동일하게 튀어나오게 하고 싶어요 아래로만 튀어나오는 게 아니라. 아래는 제가 쓴 css코드입니다 @import url('https://fonts.googleapis.com/css2?family=Raleway:ital,wght@1,300&display=swap'); @keyframes jelly{ from{} to{ transform: translateY(-50%); } } body { font-family: 'Raleway', sans-serif; font-size: 18px; color: white; height: 100vh; display: flex; justify-content: center; align-items: center; margin: 0; } .gnb{ } .gnb a{ text-decoration: none; color: black; } .gnb a::before{ display:inline-block; width: 25px; height: 25px; content: '06'; color: white; text-align: center; font-size: 15px; line-height: 25px; background-color: dodgerblue; border-radius: 50%; margin-right: 5px; } .gnb a::after{ content: 'updated 👀'; padding: 0px 5px; margin-left: 7px; background-color: red; color: white; border-radius: 3px; }

  • a
  • HTML/CSS
  • jquery
낭니 댓글 3 좋아요 1 조회수 383

async/await 질문

미해결

탄탄한 백엔드 NestJS, 기초부터 심화까지

async / await을 만약 레포지토리에서 사용했다면 서비스에서는 레포지토리 함수를 async/await 없이 그냥 호출하면 안되나요? 예를 들어) cat.repository.ts 파일에 import { createCatDto } from ' ./dto/cat.create.dto '; import { ConflictException } from ' @nestjs/common '; import { Cats } from ' src/entities/cat.entity '; import { EntityRepository , Repository } from ' typeorm '; import * as bcrypt from ' bcrypt '; @ EntityRepository ( Cats ) export class CatRepository extends Repository < Cats > { async createCat ( data : createCatDto ) { const theCat = await this. findOne ( { where : { email : data . email , }, } ) ; if ( theCat ) { throw new ConflictException ( ' 이미 존재하는 고양이입니다. ' ) ; } data . password = await bcrypt . hash ( data . password , 10 ) ; const newCat = await this. save ( this. create ( data )) ; delete newCat . password ; return newCat ; } async findCatByEmail ( email : string ) { const theCat = await this. findOne ( { where : { email , }, } ) ; return theCat ; } } 라고 하고 findCatByEmail을 사용한 AuthService에서는 auth.service.ts const cat = await this. catRepository . findCatByEmail ( email ) 위의 cat 정의에 await을 붙혀 줘야하는건가요?? 저는 이미 레포지토리단에서 프로미스로 값을 받았으니 await을 안붙혀도되는줄알았는데 안붙히니까 const isPasswordValidated = await bcrypt . compare ( password , cat . password ) cat.password 의 password에 빨간줄 들어오면서 타입스크립트에서 잡아주네요 await 빼먹은것같다면서,.. 왜 await을 붙혀 줘야하는거죠?

  • a
  • mongodb
  • express
  • nodejs
  • NestJS
  • ssr
노른자 댓글 1 좋아요 1 조회수 338

인기 태그

인프런 TOP Writers

주간 인기글