Skip to Content
한 권으로 끝내는 Node & Express(2판): 모던 웹을 위한 서버 사이드 자바스크립트의 모든 것
book

한 권으로 끝내는 Node & Express(2판): 모던 웹을 위한 서버 사이드 자바스크립트의 모든 것

by 한선용, 이선 브라운
May 2021
Beginner to intermediate
448 pages
9h 47m
Korean
Hanbit Media, Inc.
Content preview from 한 권으로 끝내는 Node & Express(2판): 모던 웹을 위한 서버 사이드 자바스크립트의 모든 것
342
한 권으로 끝내는 Node & Express
search: async (query, count) => {
const accessToken = await getAccessToken()
const options = {
hostname: ‘api.twitter.com’,
port: 443,
method: ‘GET’,
path: ‘/1.1/search/tweets.json?q=’ +
encodeURIComponent(query) +
‘&count=’ + (count || 10),
headers: {
‘Authorization’: ‘Bearer ‘ + accessToken,
},
}
return new Promise((resolve, reject) =>
https.request(options, res => {
let data = ‘’
res.on(‘data’, chunk => data += chunk)
res.on(‘end’, () => resolve(JSON.parse(data)))
}).end()
)
},
19.1.3
트윗 렌더링
이제 트윗을 검색할 수 있습니다. 그러면 사이트에는 어떻게 표시해야 할까요? 물론 여러분이
정하기 나름이지만 고려해야 할 점이 몇 가지 있습니다. 트위터는 자신의 데이터를 자신들의
규칙에 맞게 사용하길 원하며, 이에 따라 ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Start your free trial

You might also like

한 권으로 끝내는 Node & Express: 웹사이트 구축을 위한 서버 사이드 자바스크립트

한 권으로 끝내는 Node & Express: 웹사이트 구축을 위한 서버 사이드 자바스크립트

한성용, 이선 브라운

Publisher Resources

ISBN: 9791162244227