crafatar/routes/index.js
jomo f984b20344 mv modules/ lib/
that's what all the cool kids do
2015-02-27 18:49:39 +01:00

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);
};