This commit is contained in:
Flummi 2018-02-19 18:13:53 +01:00
parent 24ee908a1f
commit 84e4d9b7e7

View File

@ -7,15 +7,8 @@ import router from "./routes";
const hbs = exphbs.create({
defaultLayout: "main",
helpers: {
times: (n, block) => {
let rows = [];
for(var i = 0; i < n; ++i)
rows.push(block.fn(i+1));
return rows.join("<br />");
},
stringify: (obj) => {
return JSON.stringify(obj);
}
times: (n, block) => ([...Array(n).keys()].map(x => block.fn(++x))).join("<br />"),
stringify: obj => JSON.stringify(obj)
}
});
@ -33,6 +26,4 @@ app
.get("/:uuid", (req, res) => res.redirect(`/v/${req.params.uuid}/`))
.listen(cfg.websrv.port, () => {
console.log(`fpaste listening on port ${cfg.websrv.port}`);
});
.listen(cfg.websrv.port, () => console.log(`fpaste listening on port ${cfg.websrv.port}`));