mirror of
https://codeberg.org/ashley/poke.git
synced 2024-11-10 09:38:25 +01:00
add favicon finally :3
This commit is contained in:
parent
c0d3b361e4
commit
a0ff887864
1 changed files with 5 additions and 1 deletions
|
@ -139,6 +139,10 @@ module.exports = function (app, config, renderTemplate) {
|
|||
|
||||
const cssDir = "./css/";
|
||||
|
||||
app.get("/favicon.ico", function (req, res) {
|
||||
res.sendFile("favicon.ico", { root: cssDir });
|
||||
});
|
||||
|
||||
app.get("/css/:id", (req, res) => {
|
||||
const filePath = path.join(cssDir, req.params.id);
|
||||
if (!fs.existsSync(filePath)) {
|
||||
|
@ -207,7 +211,7 @@ module.exports = function (app, config, renderTemplate) {
|
|||
|
||||
const js = fs.readFileSync(filePath, "utf8");
|
||||
const minimizedJs = require("uglify-js").minify(js).code;
|
||||
|
||||
|
||||
res.header("Content-Type", "text/javascript");
|
||||
res.send(
|
||||
"// @license magnet:?xt=urn:btih:1f739d935676111cfff4b4693e3816e664797050&dn=gpl-3.0.txt GPL-3.0-or-later" +
|
||||
|
|
Loading…
Reference in a new issue