일 | 월 | 화 | 수 | 목 | 금 | 토 |
---|---|---|---|---|---|---|
1 | 2 | 3 | 4 | |||
5 | 6 | 7 | 8 | 9 | 10 | 11 |
12 | 13 | 14 | 15 | 16 | 17 | 18 |
19 | 20 | 21 | 22 | 23 | 24 | 25 |
26 | 27 | 28 | 29 | 30 | 31 |
- Developer_JoyKim
- 알고리즘
- 코딩공부
- 코플릿
- 최강의 인생
- array
- 정규표현식
- array.push()
- Where
- array.slice()
- Hackerrank
- Programmers
- 자바스크립트
- JavaScript
- 코딩테스트
- 배열
- 프로그래머스
- SQL
- 블록체인
- 코드스테이츠
- join
- node.js
- MySQL
- select
- 개발자_조이킴
- 재귀함수
- 역행자
- 개발자의 책장
- for문
- Algorithms
- Today
- Total
목록node.js (10)
CodingSpace
Intro. 사이드 프로젝트 개발이 종료된 후 공부차 개인적으로 Node.js + Express로 개발한 백엔드 코드를 리팩토링하기로 결정했다. 리팩토링 이전에 테스트 코드를 작성하기로 했고 JS 진영에서 널리 사용되는 Jest 라이브러리를 사용하기로 했다. 테스트 코드 실행을 위해 초기 세팅을 하는 중 아래와 같은 에러가 발생했다. ReferenceError: You are trying to `import` a file after the Jest environment has been torn down. 에러는 작성한 테스트 코드를 실행하기 위해 아래와 같은 명령어를 터미널 창에 입력했을 때 발생했다. // 터미널에 입력한 명령어 npm run test // package.json - test "test..
Intro. POST 요청할 때 body 파라미터에 값을 넣었는데 왜 undefined 이지? node.js와 express로 프로젝트를 처음 시작해본 개발자라면 아마 한번씩은 경험해본 상황일 것이다. 아주 간단한 문제이지만 처음 만나면 당황하고 약간의 짜증(?)이 나기 쉬운 상황. 오늘은 그 문제에 대해 이야기 해보자! Description. 1. npm 프로젝트 시작하기 npm init 명령어를 입력해서 새로운 프로젝트를 생성한다! // npm 프로젝트 생성 npm init 명령어를 입력하고 Enter를 계속 입력해주면 package.json 파일이 생성된다! 2. express 설치하기 npm install express 명령어를 입력해서 express를 설치한다. // express 설치 npm ..
What: 메타마스크와 같은 가상 지갑에서 사용하는 니모닉 지갑 개발을 목표로 하는 컨텐츠 Chapter1에서는 니모닉 지갑 생성에 필요한 니모닉 12구문(mnemonic phrase)을 생성하는 API 구현에 관한 컨텐츠 Objectives. 니모닉 지갑 생성에 사용할 니모닉 12구문을 생성하는 API를 만든다. 생성한 API를 편리하게 테스트할 수 있게 Swagger를 작성한다. Develop. 1. eth-lightwallet 패키지 사용 니모닉 12구문을 랜덤하게 생성하기 위해 eth-lightwallet을 사용했다. eth-lightwallet의 docs 주소는 아래와 같다: https://www.npmjs.com/package/eth-lightwallet eth-lightwallet A lig..
Problem. Search - Ice Cream Parlor Link. https://www.hackerrank.com/challenges/icecream-parlor/problem?isFullScreen=true Ice Cream Parlor | HackerRank Help Sunny and Johnny spend all their money during each trip to the Ice Cream Parlor. www.hackerrank.com Description. Two friends like to pool their money and go to the ice cream parlor. They always choose two distinct flavors and they spend all o..
Problem. Sorting - Big Sorting Link. https://www.hackerrank.com/challenges/big-sorting/problem?isFullScreen=true Big Sorting | HackerRank Sort an array of very long numeric strings. www.hackerrank.com Description. Consider an array of numeric strings where each string is a positive number with anywhere from 1 to 10^6 digits. Sort the array's elements in non-decreasing, or ascending order of thei..
Problem. Warmup - Compare the Triplets Link. https://www.hackerrank.com/challenges/compare-the-triplets/problem?isFullScreen=true Compare the Triplets | HackerRank Compare the elements in two triplets. www.hackerrank.com Description. Alice and Bob each created one problem for HackerRank. A reviewer rates the two challenges, awarding points on a scale from 1 to 100 for three categories: problem c..
Problem. Warmup - Staircase Link. https://www.hackerrank.com/challenges/staircase/problem?isFullScreen=true Staircase | HackerRank Print a right-aligned staircase with n steps. www.hackerrank.com Description. Key Point. My Answer. 'use strict'; process.stdin.resume(); process.stdin.setEncoding('utf-8'); let inputString = ''; let currentLine = 0; process.stdin.on('data', function(inputStdin) { in..
Problem. Implementation - Repeated String Link. https://www.hackerrank.com/challenges/repeated-string/problem?isFullScreen=true Repeated String | HackerRank Find and print the number of letter a's in the first n letters of an infinitely large periodic string. www.hackerrank.com Description. There is a string, s, of lowercase English letters that is repeated infinitely many times. Given an intege..