1.0.2 • Published 2 months ago

@sefinek/express-favicon v1.0.2

Weekly downloads
-
License
MIT
Repository
github
Last release
2 months ago

@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

Favicon 48x48

MIT License

Copyright 2023-2024 © by Sefinek. All Rights Reserved.