Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/sjinks/fastify-favicon

Fastify plugin to eliminate errors for favicon.ico requests
https://github.com/sjinks/fastify-favicon

fastify fastify-plugin favicon plugin

Last synced: about 1 month ago
JSON representation

Fastify plugin to eliminate errors for favicon.ico requests

Awesome Lists containing this project

README

        

# fastify-favicon

[![Build and Test](https://github.com/sjinks/fastify-favicon/actions/workflows/build.yml/badge.svg)](https://github.com/sjinks/fastify-favicon/actions/workflows/build.yml)
[![CodeQL Analysis](https://github.com/sjinks/fastify-favicon/actions/workflows/codeql-analysis.yml/badge.svg)](https://github.com/sjinks/fastify-favicon/actions/workflows/codeql-analysis.yml)
[![Package Audit](https://github.com/sjinks/fastify-favicon/actions/workflows/package-audit.yml/badge.svg)](https://github.com/sjinks/fastify-favicon/actions/workflows/package-audit.yml)

A plugin for [Fastify](https://github.com/fastify/fastify) to eliminate exceptions on requests to `/favicon.ico`.

## Installation

```sh
npm install --save-dev @wwa/fastify-favicon
```

## Usage

```js
const fastify = require('fastify')();
fastify.register(require('@wwa/fastify-favicon'));

fastify.listen(3000);
```

Requests to `/favicon.ico` will return a 16x16 black icon.