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판): 모던 웹을 위한 서버 사이드 자바스크립트의 모든 것
425
부록
D
이메일 전송
D.2
HTML
이메일 전송
평문 텍스트와
HTML
두 가지 버전으로 보내는 것 역시
msg
객체에
html
프로퍼티 하나만 추
가하면 끝입니다.
D.2.1
뷰를 통한
HTML
이메일 전송
본문만으로는 조금 부족한 감이 있어 설명을 추가합니다.
10
장에서 했던 것과 마찬가지로,
views
/
home
.
handlebars
에 관련 링크를 추가합니다.
...
<p><a href=”/cart/checkout”>confirm email example</a></p>
{{> weather}}
...
meadowlark
.
js
GET
POST
라우트를 추가합니다.
app.get(‘/cart/checkout’, handlers.checkoutEmail)
app.post(‘/cart/checkout’, handlers.checkoutEmailProcess)
lib
/
handlers
.
js
에 핸들러를 추가합니다.
exports.checkoutEmail = (req, res) => {
// 장바구니 시뮬레이션 코드
req.session.cart = {
items: [
{ id: ‘82RgrqGCAHqCf6rA2vujbT’, qty: 1, guests: 2 },
{ id: ‘bqBtwqxpB4ohuxCBXRE9tq’, qty: 1 },
],
}
res.render(‘checkoutEmail’) ...
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