3.0.0 • Published 7 months ago

@tinyhttp/favicon v3.0.0

Weekly downloads
42
License
MIT
Repository
github
Last release
7 months ago

@tinyhttp/favicon

npm GitHub Workflow Status Coverage

A rewrite of serve-favicon module.

Node.js middleware to serve favicon.ico file.

Install

pnpm i @tinyhttp/favicon

API

import { favicon } from '@tinyhttp/favicon'

Options

favicon accepts these properties in the options object.

path

Path to icon, required. Passed as the first argument.

maxAge

Sets Cache-Control: maxAge= header, optional. Default is one year. Passed with object in the second argument.

Example

import { favicon } from '@tinyhttp/favicon'
import { createServer } from 'node:http'
import path from 'node:path'

createServer(favicon(path.join(process.cwd(), 'public', 'favicon.ico')).listen(3000)
3.0.0

7 months ago

2.0.1

3 years ago

2.0.0

3 years ago

1.3.0

3 years ago

1.2.6

3 years ago

1.2.5

3 years ago

1.2.4

3 years ago

1.2.3

3 years ago

1.2.2

3 years ago

1.2.1

3 years ago

1.2.0

3 years ago

1.1.2

3 years ago

1.1.1

3 years ago

1.1.0

3 years ago

1.0.7

3 years ago

1.0.6

3 years ago

1.0.5

3 years ago

1.0.4

3 years ago

1.0.3

3 years ago

1.0.2

3 years ago

1.0.1

3 years ago

1.0.0

3 years ago

0.5.2

3 years ago

0.5.1

4 years ago

0.5.0

4 years ago

0.4.1

4 years ago

0.4.0

4 years ago

0.1.2

4 years ago

0.1.1

4 years ago

0.1.0

4 years ago

0.0.5

4 years ago

0.0.4

4 years ago

0.0.3

4 years ago

0.0.1

4 years ago