[ejs] html 페이지 템플릿을 위한 ejs 모듈 예제
ejs 모듈은 html 템플릿 생성을 위한 모듈이다. jsp 와 비슷한 형태를 하고 있으며, jsp 의 스크립틀릿 형태로 작성하면 자체 렌더러를 이용하여 html 형식으로 변환해 준다. var ejs = require('ejs'); var fs = require('fs'); // file read html_str = fs.readFileSync(__dirname + '/sample.ejs', 'utf-8'); // compile template = ejs.compile(html_str); console.log(template({ 'title' : 'compile' })); // render console.log(ejs.render(html_str, { 'title' : 'render' })); compi..
프레임워크/[JS] node.js
2016. 3. 8. 15:51
반응형
공지사항
최근에 올라온 글
최근에 달린 댓글
- Total
- Today
- Yesterday
링크
TAG
- build
- airflow
- oozie
- 백준
- 오류
- S3
- 하둡
- nodejs
- HIVE
- 다이나믹
- 정올
- mysql
- SPARK
- yarn
- ubuntu
- 알고리즘
- bash
- SQL
- Tez
- Linux
- hbase
- java
- Hadoop
- Python
- error
- emr
- 하이브
- 파이썬
- AWS
- HDFS
일 | 월 | 화 | 수 | 목 | 금 | 토 |
---|---|---|---|---|---|---|
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 |
글 보관함