Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVASCRIPT

how to seperate header body and footer in node

var header = fs.readFileSync(__dirname +'/project_views/head.html');
var footer = fs.readFileSync(__dirname +'/project_views/footer.html');
var body = fs.readFileSync(__dirname +'/project_views/project_views/index.html');
var content = header + body + footer;
res.setHeader('content-type', "text/html; charset=UTF-8");
res.send(content);
 
PREVIOUS NEXT
Tagged: #seperate #header #body #footer #node
ADD COMMENT
Topic
Name
2+1 =