@sefinek/express-favicon
TypeScript icon, indicating that this package has built-in type declarations

1.0.2 • Public • Published

@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.

Package Sidebar

Install

npm i @sefinek/express-favicon

Weekly Downloads

4

Version

1.0.2

License

MIT

Unpacked Size

6.93 kB

Total Files

8

Last publish

Collaborators

  • sefinek