API Server에서 list를 불러오는 GET method를 구현하면서 매우 많이 양의 데이터가 list될 수 있는 상황이 생겨서 stream를 구현하게 되었다. server측 stream은 Node.js 내장 module에 stream이 구현되어 있어 쉽게 사용할 수 있다. const stream = require(‘stream’); stream은 4가지의 기본 type을 가진다. Writable: data를 쓸 수 있는 stream Readable: data를 읽을 수 있는 stream Duplex: Readable과 Writable 모두 할 수 있는 stream Transform: data를 수정하거나 변형할 수 있는 stream - Duplex stream이다. mongodb에서 cursor를..
Error 객체를 JSON.stringify()하면 error message, stack field가 사라진다. const err = new Error('test'); console.log(JSON.stringify(err)); // {} 객체의 속성들은 그 자체로 객체 내부의 정보와 기능을 표현하지만, 각 속성들은 다시 그 자신들의 값과 성질에 대한 눈에 보이지않는 내부 속성들을 가지고 있습니다. 자바스크립트에서는 이러한 속성의 세부적인 성질을 직접 설정하거나 조회할 수 있는 방법을 제공하는데, 이 때 이용되는 특수한 객체가 바로 속성 설명자(PropertyDescriptor) 이다. var error = new Error(‘test'); var propertyNames = Object.getOwnPr..
- Total
- Today
- Yesterday
- Cloudfront
- Prisma
- nginx
- commit message
- conventional commit
- mognodb
- Python
- Neptune
- Develop
- AWS community day seoul
- Elasticsearch
- NLP
- lambda@edge
- typescript
- Airflow
- pagination
- slowquery
- nltk
- Clickjacking
- Lifecycle
- sementic version
- graphql
- aws
- inversify
- mongoDB
- JavaScript
- shorten
- Cognito
- Github Actions
- Terraform
| 일 | 월 | 화 | 수 | 목 | 금 | 토 |
|---|---|---|---|---|---|---|
| 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 |