일 | 월 | 화 | 수 | 목 | 금 | 토 |
---|---|---|---|---|---|---|
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 |
- icrawler
- signIn
- react-admin
- jimp
- JavaScript
- Route53
- readableStream
- react-hook-form
- node
- xlsx
- yml
- react
- 가상 DOM
- electron-builder
- cognito
- axios
- gitignore
- AWS
- react-xml-parser
- dynamodb
- react DOM
- window.postMessage
- electron
- 프로그래머스
- API Gateway
- domtoimage
- timeinput
- zerocho
- TypeScript
- react-sortable-hoc
- Today
- Total
목록node (2)
꾸준히 공부하는 개발자

dblp.xml 이라는 대용량을 한번에 읽어오려다 보니 읽어 지지가 않았다. 그래서 선임분이 stream을 사용하라고 하여 검색을 해보았다. 비동기로 작동하는 것을 보고 Promise 를 반환하는 식으로 하여 동기적으로 처리할라고 하였다. const asyncXML = (xml) => { //xml은 url return new Promise((resolve, reject) => { let result = []; (async () => { const fetchedResource = await fetch(xml) const reader = await fetchedResource.body.getReader() reader.read().then(function processText({done, value}) {..

import Bluebird from 'bluebird' const handlerFile = await Bluebird.map(data, item => new Bluebird(async (resolve, reject) => { setTimeout(async () => { try { if (item.mainImages) await uploadToS3(item, 'mainImages', 'images', null, 'products') setLoadingCount(prevCount => prevCount + 1) } catch (e) { setLoadingCount(prevCount => prevCount + 1) item.mainImages = [] console.log(e) } try { if (item..