@sefinek/express-favicon
v1.0.2
Published
Favicon middleware for Express.js with additional headers responsible for caching the icon in the client's browser.
Downloads
6
Maintainers
Readme
@sefinek/express-favicon
Favicon middleware for Express.js with additional headers responsible for caching the icon in the client's browser.
Installation
npm install @sefinek/express-favicon
Usage
const express = require('express');
const favicon = require('@sefinek/express-favicon');
const app = express();
app.use(favicon(__dirname + '/public/favicon.png'));
app.get('/', (req, res) => {
res.send('<h1>Hello World!</h1>');
});
app.listen(8080, () => {
console.log('Example app is ready!');
});
Example icon
MIT License
Copyright 2023-2024 © by Sefinek. All Rights Reserved.