Как отрендерить шаблон
Привет. Я с ума сойду с этой нодой..
|
Вооружиться фреймвёрком Express и написать res.render('шаблон').
|
const http = require('http'); http.createServer(function (req, res) { var html = buildHtml(req); res.writeHead(200, { 'Content-Type': 'text/html', 'Content-Length': html.length, 'Expires': new Date().toUTCString() }); res.end('<div>Test</div>''); }).listen(5000); |
Часовой пояс GMT +3, время: 12:53. |