mirror of
https://github.com/azures04/crafatar.git
synced 2026-03-21 23:41:18 +01:00
18 lines
452 B
JavaScript
18 lines
452 B
JavaScript
var config = require("../lib/config");
|
|
var jade = require("jade");
|
|
|
|
// compile jade
|
|
var index = jade.compileFile(__dirname + "/../views/index.jade");
|
|
|
|
module.exports = function(req, res) {
|
|
var html = index({
|
|
title: "Crafatar",
|
|
domain: "https://" + req.headers.host,
|
|
config: config
|
|
});
|
|
res.writeHead(200, {
|
|
"Content-Length": Buffer.byteLength(html, "UTF-8"),
|
|
"Content-Type": "text/html; charset=utf-8"
|
|
});
|
|
res.end(html);
|
|
}; |