{"id":18535294,"url":"https://github.com/tinyhttp/favicon","last_synced_at":"2025-04-09T15:32:03.149Z","repository":{"id":57166679,"uuid":"383846641","full_name":"tinyhttp/favicon","owner":"tinyhttp","description":"Node.js middleware to serve `favicon.ico` file.","archived":false,"fork":false,"pushed_at":"2023-10-27T13:48:15.000Z","size":300,"stargazers_count":3,"open_issues_count":0,"forks_count":1,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-03-24T08:47:18.062Z","etag":null,"topics":["favicon","http","middleware","nodejs"],"latest_commit_sha":null,"homepage":"","language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/tinyhttp.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":".github/FUNDING.yml","license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null},"funding":{"github":["tinyhttp","talentlessguy"],"issuehunt":"talentlessguy"}},"created_at":"2021-07-07T15:35:31.000Z","updated_at":"2023-10-27T13:48:21.000Z","dependencies_parsed_at":"2022-08-30T15:10:13.147Z","dependency_job_id":"bc9be963-280e-4d73-ba36-d42105a12298","html_url":"https://github.com/tinyhttp/favicon","commit_stats":null,"previous_names":[],"tags_count":1,"template":false,"template_full_name":"tinyhttp/repo-template","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tinyhttp%2Ffavicon","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tinyhttp%2Ffavicon/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tinyhttp%2Ffavicon/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tinyhttp%2Ffavicon/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/tinyhttp","download_url":"https://codeload.github.com/tinyhttp/favicon/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248058076,"owners_count":21040691,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["favicon","http","middleware","nodejs"],"created_at":"2024-11-06T19:21:56.051Z","updated_at":"2025-04-09T15:32:03.143Z","avatar_url":"https://github.com/tinyhttp.png","language":"TypeScript","readme":"\u003cdiv align=\"center\"\u003e\n\n# @tinyhttp/favicon\n\n[![npm][npm-img]][npm-url] [![GitHub Workflow Status][gh-actions-img]][github-actions] [![Coverage][cov-img]][cov-url]\n\n\u003c/div\u003e\n\n\u003e A rewrite of [serve-favicon](https://github.com/expressjs/serve-favicon) module.\n\nNode.js middleware to serve `favicon.ico` file.\n\n## Install\n\n```sh\npnpm i @tinyhttp/favicon\n```\n\n## API\n\n```js\nimport { favicon } from '@tinyhttp/favicon'\n```\n\n### Options\n\n`favicon` accepts these properties in the options object.\n\n#### `path`\n\nPath to icon, required. Passed as the first argument.\n\n#### `maxAge`\n\nSets `Cache-Control: maxAge=` header, optional. Default is one year. Passed with object in the second argument.\n\n## Example\n\n```js\nimport { favicon } from '@tinyhttp/favicon'\nimport { createServer } from 'node:http'\nimport path from 'node:path'\n\ncreateServer(favicon(path.join(process.cwd(), 'public', 'favicon.ico')).listen(3000)\n```\n\n[npm-url]: https://npmjs.com/package/@tinyhttp/favicon\n[github-actions]: https://github.com/tinyhttp/favicon/actions\n[gh-actions-img]: https://img.shields.io/github/actions/workflow/status/tinyhttp/favicon/ci.yml?style=for-the-badge\u0026logo=github\u0026label=\u0026color=hotpink\n[cov-img]: https://img.shields.io/coveralls/github/tinyhttp/favicon?style=for-the-badge\u0026color=hotpink\n[cov-url]: https://coveralls.io/github/tinyhttp/favicon\n[npm-img]: https://img.shields.io/npm/dt/@tinyhttp/favicon?style=for-the-badge\u0026color=hotpink\n","funding_links":["https://github.com/sponsors/tinyhttp","https://github.com/sponsors/talentlessguy","https://issuehunt.io/r/talentlessguy"],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftinyhttp%2Ffavicon","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ftinyhttp%2Ffavicon","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftinyhttp%2Ffavicon/lists"}