2.0.0 • Published 2 years ago

@tycrek/nofavicon v2.0.0

Weekly downloads
-
License
ISC
Repository
github
Last release
2 years ago

NoFavicon

Express middleware to easily send no favicon (HTTP 204), a file, or URL-based favicon.

Usage

Install with npm i @tycrek/nofavicon and use as a middleware:

const nofavicon = require('@tycrek/nofavicon');
const express = require('express');

const app = express();

// None: returns HTTP 204: No Content
app.use(none());

// File: returns a file (best to use with path.join)
app.use(file(path.join(process.cwd(), `/favicon.ico`)));

// URL: redirects to a URL
app.use(url('https://tycrek.com/favicon.ico'));