five-server
Version:
Development Server with Live Reload Capability. (Maintained Fork of Live Server)
22 lines • 633 B
JavaScript
;
/**
* @author Yannick Deubel (https://github.com/yandeu)
* @copyright Copyright (c) 2021 Yannick Deubel
* @license {@link https://github.com/yandeu/five-server/blob/main/LICENSE LICENSE}
*/
Object.defineProperty(exports, "__esModule", { value: true });
exports.favicon = void 0;
const public_1 = require("../public");
let icon;
const favicon = (req, res, next) => {
if (/favicon\.ico$/.test(req.url)) {
if (!icon)
icon = public_1.FAVICON;
res.type('ico').send(icon);
}
else {
return next();
}
};
exports.favicon = favicon;
//# sourceMappingURL=favicon.js.map