Просмотр полной версии : Как отрендерить шаблон
Привет. Я с ума сойду с этой нодой..
Audaxviator
02.06.2017, 22:34
Вооружиться фреймвёрком Express и написать res.render('шаблон').
ruslan_mart
08.06.2017, 01:32
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);
vBulletin® v3.6.7, Copyright ©2000-2025, Jelsoft Enterprises Ltd. Перевод: zCarot