Coder Social home page Coder Social logo

nest-study's Introduction

Nest Logo

A progressive Node.js framework for building efficient and scalable server-side applications.

NPM Version Package License NPM Downloads CircleCI Coverage Discord Backers on Open Collective Sponsors on Open Collective Support us

Description

Nest framework TypeScript starter repository.

Installation

$ npm install

Running the app

# development
$ npm run start

# watch mode
$ npm run start:dev

# production mode
$ npm run start:prod

Test

# unit tests
$ npm run test

# e2e tests
$ npm run test:e2e

# test coverage
$ npm run test:cov

Support

Nest is an MIT-licensed open source project. It can grow thanks to the sponsors and support by the amazing backers. If you'd like to join them, please read more here.

Stay in touch

License

Nest is MIT licensed.

nest-study's People

Contributors

eeeasycode avatar

Watchers

 avatar

nest-study's Issues

Github-Action 무한 루프 해결

test.yml 로직에서 test 커버리지 수치를 readme.md에 push 과정에서 지속적으로 push 이벤트 발생
-> 이로 인해, test.yml 의 github action이 무한 루프

해결

jobs:
  TEST:
    runs-on: ubuntu-latest
    if: ${{ !contains(github.event.head_commit.message, '[TEST] update test coverage') }}

if문을 추가하여 readme.md를 업데이트 시켜주는 commit message는 제외하고 실행시킴

node version으로 인한 실행 실패

에러 내용 중 대충 node_modules/ ~~ ?? 와 관련된 에러면 일단 내 로컬 환경의 node 버전을 확인해볼 것

nvm use로 프로젝트에 맞는 node 버전으로 맞춰줄 것

Typeorm에서 beforeinsert가 동작하지 않는 문제

User Entity에서 비밀번호 hash를 위해 beforeinsert를 선언해 사용함
-> beforeinsert가 수행되지 않고 DB에 plain text가 그대로 저장되는 이슈 발생

this.usersRepository.save(user);

에서

const user = this.usersRepository.create(user);
this.usersRepository.save(user);

로 변경하니 제대로 작동하는 것을 확인함.

create -> 엔티티 객체 생성
insert -> insert 쿼리 후 select 쿼리 실행
save -> 데이터가 있으면 수정, 없으면 삽입

Test Code 작성에 대한 이슈

[test]

users의 service, controller 로직 test 코드를 추가함
TDD에 대한 학습 뿐만 아니라, 기본적인 test 코드 작성법에 대한 이해가 필요함
현재 작성한 코드에 대한 이해도 부족하고, mock 데이터에 대한 이해도 많이 부족함

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.