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

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

by 한성용, 이선 브라운
April 2016
Beginner to intermediate
389 pages
9h 8m
Korean
Hanbit Media, Inc.
Content preview from 한 권으로 끝내는 Node & Express: 웹사이트 구축을 위한 서버 사이드 자바스크립트
179
11
-
이메일 보내기
name
:
name
,
email
:
email
,
};
res
.
render
('
email
/
cart
-
thank
-
you
',
{
layout
:
null
,
cart
:
cart
},
function
(
err
,
html
){
if
(
err
)
console
.
log
('
error in email template
');
mailTransport
.
sendMail
({
from
:
'"
Meadowlark Travel
":
info
@
meadowlarktravel
.
com
',
to
:
cart
.
billing
.
email
,
subject
:
'
Thank You for Book your Trip with Meadowlark
',
html
:
html
,
generateTextFromHtml
:
true
},
function
(
err
){
if
(
err
)
console
.
error
('
Unable to send confirmation
:
'
+
err
.
stack
);
});
}
);
res
.
render
('
cart
-
thank
-
you
',
{
cart
:
cart
});
});
여기서 우리는
res
.
render
를 두 번 호출했습니다. 일반적으로는 한 번만 호출합니다. 두 번 호
출하면 첫 번째 호출 결과만 표시됩니다. 하지만 여기서는 첫 번째 호출했을 때
sms
일반적인
렌더링 과정을 피해 갑니다
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(2판): 모던 웹을 위한 서버 사이드 자바스크립트의 모든 것

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

한선용, 이선 브라운

Publisher Resources

ISBN: 9788968482229