es6!
This commit is contained in:
parent
24ee908a1f
commit
84e4d9b7e7
|
@ -7,15 +7,8 @@ import router from "./routes";
|
||||||
const hbs = exphbs.create({
|
const hbs = exphbs.create({
|
||||||
defaultLayout: "main",
|
defaultLayout: "main",
|
||||||
helpers: {
|
helpers: {
|
||||||
times: (n, block) => {
|
times: (n, block) => ([...Array(n).keys()].map(x => block.fn(++x))).join("<br />"),
|
||||||
let rows = [];
|
stringify: obj => JSON.stringify(obj)
|
||||||
for(var i = 0; i < n; ++i)
|
|
||||||
rows.push(block.fn(i+1));
|
|
||||||
return rows.join("<br />");
|
|
||||||
},
|
|
||||||
stringify: (obj) => {
|
|
||||||
return JSON.stringify(obj);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
|
@ -33,6 +26,4 @@ app
|
||||||
|
|
||||||
.get("/:uuid", (req, res) => res.redirect(`/v/${req.params.uuid}/`))
|
.get("/:uuid", (req, res) => res.redirect(`/v/${req.params.uuid}/`))
|
||||||
|
|
||||||
.listen(cfg.websrv.port, () => {
|
.listen(cfg.websrv.port, () => console.log(`fpaste listening on port ${cfg.websrv.port}`));
|
||||||
console.log(`fpaste listening on port ${cfg.websrv.port}`);
|
|
||||||
});
|
|
Loading…
Reference in New Issue
Block a user