Notice
Recent Posts
Recent Comments
Link
일 | 월 | 화 | 수 | 목 | 금 | 토 |
---|---|---|---|---|---|---|
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 |
Tags
- MFA
- Filter
- Reduxpender
- Spring Batch
- preventdefault
- Spring REST Docs
- Pender
- SpringBoot
- vuejs
- MSA
- stopPropogation
- T-OTP
- gradle
- vue
- tasklet
- JavaScript
- Crawling
- Spring Security
- OpenStack
- Flyway
- AuthenticatoinProvide
- cheerio
- UsernamePasswordAuthenticationFilter
- openapi3
- axios
- SWAGGER
- 리액트
- cloud native
- SpringRESTDocs
- REACT
Archives
- Today
- Total
목록MongoDB (1)
Miracle Morning, LHWN
2_0. 조회(GET), 삭제(DELETE), 수정(PUT, PATCH)
데이터 조회 (GET) # 데이터베이스의 데이터를 조회할 때에는 find() 메서드를 사용한다. exports.list = async (ctx) => { let books; try { books = await Book.find().exec(); } catch (e) { return ctx.throw(500, e); } ctx.body = books; }; ※ let 이나 const 는 scope 가 블록단위이다. books = await Book.find().exec(); .exec() 함수를 뒤에 붙여주어야 실제로 데이터베이스에 요청이 이루어진다. 이때의 반환 값은 Promise 이기 때문에 await 을 사용할 수 있다. # 이번에는 여러 옵션을 주어 최근에 생성된 3개의 데이터만 조회해보자. (..
IT 기술/[React] Project
2021. 6. 1. 14:26