{"id":23176191,"url":"https://github.com/smartiniongithub/fastify-favicon","last_synced_at":"2025-08-18T10:32:15.913Z","repository":{"id":28598434,"uuid":"118832842","full_name":"smartiniOnGitHub/fastify-favicon","owner":"smartiniOnGitHub","description":"Fastify Plugin to serve default favicon","archived":false,"fork":false,"pushed_at":"2024-09-22T18:02:59.000Z","size":85,"stargazers_count":13,"open_issues_count":0,"forks_count":4,"subscribers_count":3,"default_branch":"master","last_synced_at":"2024-12-17T01:25:38.538Z","etag":null,"topics":["fastify","fastify-plugin","favicon"],"latest_commit_sha":null,"homepage":null,"language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/smartiniOnGitHub.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null}},"created_at":"2018-01-24T22:58:40.000Z","updated_at":"2024-09-21T16:57:20.000Z","dependencies_parsed_at":"2024-04-12T11:01:52.984Z","dependency_job_id":"1b29bbc0-f32b-4868-9151-21debdeefc04","html_url":"https://github.com/smartiniOnGitHub/fastify-favicon","commit_stats":{"total_commits":91,"total_committers":5,"mean_commits":18.2,"dds":0.06593406593406592,"last_synced_commit":"4ddcf6f26dc88ac367824311f9a61421d1b47d02"},"previous_names":[],"tags_count":21,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/smartiniOnGitHub%2Ffastify-favicon","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/smartiniOnGitHub%2Ffastify-favicon/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/smartiniOnGitHub%2Ffastify-favicon/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/smartiniOnGitHub%2Ffastify-favicon/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/smartiniOnGitHub","download_url":"https://codeload.github.com/smartiniOnGitHub/fastify-favicon/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":230225636,"owners_count":18193015,"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":["fastify","fastify-plugin","favicon"],"created_at":"2024-12-18T06:15:47.546Z","updated_at":"2024-12-18T06:15:48.123Z","avatar_url":"https://github.com/smartiniOnGitHub.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# fastify-favicon\n\n  [![NPM Version](https://img.shields.io/npm/v/fastify-favicon.svg?style=flat)](https://npmjs.org/package/fastify-favicon/)\n  [![NPM Downloads](https://img.shields.io/npm/dm/fastify-favicon.svg?style=flat)](https://npmjs.org/package/fastify-favicon/)\n  [![Code Style](https://img.shields.io/badge/code%20style-standard-brightgreen.svg?style=flat)](http://standardjs.com/)\n  [![license - APACHE-2.0](https://img.shields.io/npm/l/fastify-favicon.svg)](http://opensource.org/licenses/APACHE-2.0)\n\nFastify Plugin to serve the favicon.\n\nWith this plugin, Fastify will have a route configured for favicon (usually `/favicon.ico`) requests.\n\n\n## Usage\n\n```js\nconst fastify = require('fastify')()\n\n// example without specifying options, searching favicon.ico from project root,\n// otherwise returning a default favicon\nfastify.register(require('fastify-favicon'))\n// or\n// example with custom path (usually relative to project root, but could be absolute),\n// and custom name; all options are optional\nfastify.register(require('fastify-favicon'), { path: './test', name: 'icon.ico', maxAge: 3600 })\n\nfastify.listen({ port: 3000, host: 'localhost' })\n// curl http://127.0.0.1:3000/favicon.ico =\u003e returning the image, and no error thrown\n```\n\n## Requirements\n\nFastify ^5.0.0 , Node.js 20 LTS (20.9.0) or later.\nNote that plugin releases 4.x are for Fastify 4.x, 5.x for Fastify 5.x, etc.\n\n\n## Sources\n\nSource code is all inside main repo:\n[fastify-favicon](https://github.com/smartiniOnGitHub/fastify-favicon).\n\nDocumentation generated from source code (library API):\n[here](https://smartiniongithub.github.io/fastify-favicon/).\n\n\n## Note\n\nThe plugin exposes a GET handler on the URI `/${name}`;\nFastify default favicon is used by default, but a custom one can be used.\n\nPlugin options:\n- path (default `__dirname`) for the folder containing the icon\n- name (default 'favicon.ico') for favicon file name\n- maxAge (default 86400) for cache duration in seconds for the image\n\n\n## Contributing\n\n1. Fork it ( https://github.com/smartiniOnGitHub/fastify-favicon/fork )\n2. Create your feature branch (git checkout -b my-new-feature)\n3. Commit your changes (git commit -am 'Add some feature')\n4. Push to the branch (git push origin my-new-feature)\n5. Create a new Pull Request\n\n\n## License\n\nLicensed under [Apache-2.0](./LICENSE).\n\n----\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsmartiniongithub%2Ffastify-favicon","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsmartiniongithub%2Ffastify-favicon","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsmartiniongithub%2Ffastify-favicon/lists"}