{"id":22489281,"url":"https://github.com/AugustArchive/fastify-nitro","last_synced_at":"2025-08-02T21:32:26.016Z","repository":{"id":65537802,"uuid":"593775020","full_name":"AugustArchive/fastify-nitro","owner":"AugustArchive","description":":polar_bear:⚗️ Experimental Nitro (unjs/nitro) preset to export a Nitro server as middleware for fastify","archived":true,"fork":false,"pushed_at":"2024-06-29T13:59:05.000Z","size":9332,"stargazers_count":16,"open_issues_count":8,"forks_count":3,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-07-27T19:58:58.588Z","etag":null,"topics":["fastify","nitro","nitro-preset","nodejs","unjs"],"latest_commit_sha":null,"homepage":"https://npm.im/@augu/fastify-nitro","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/AugustArchive.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":".github/CODE_OF_CONDUCT.md","threat_model":null,"audit":null,"citation":null,"codeowners":".github/CODEOWNERS","security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null},"funding":{"github":["auguwu"],"custom":["https://paypal.me/auguwu","floofy.dev"]}},"created_at":"2023-01-26T20:10:51.000Z","updated_at":"2024-07-01T00:41:24.000Z","dependencies_parsed_at":"2024-03-08T03:28:34.267Z","dependency_job_id":"6fe6c689-ec25-4a7b-b11a-74ce7f44f8d0","html_url":"https://github.com/AugustArchive/fastify-nitro","commit_stats":null,"previous_names":["auguwu/nitro-preset","augustarchive/fastify-nitro"],"tags_count":5,"template":false,"template_full_name":null,"purl":"pkg:github/AugustArchive/fastify-nitro","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/AugustArchive%2Ffastify-nitro","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/AugustArchive%2Ffastify-nitro/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/AugustArchive%2Ffastify-nitro/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/AugustArchive%2Ffastify-nitro/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/AugustArchive","download_url":"https://codeload.github.com/AugustArchive/fastify-nitro/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/AugustArchive%2Ffastify-nitro/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":268456774,"owners_count":24253279,"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","status":"online","status_checked_at":"2025-08-02T02:00:12.353Z","response_time":74,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"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","nitro","nitro-preset","nodejs","unjs"],"created_at":"2024-12-06T17:19:33.973Z","updated_at":"2025-08-02T21:32:24.704Z","avatar_url":"https://github.com/AugustArchive.png","language":"TypeScript","funding_links":["https://github.com/sponsors/auguwu","https://paypal.me/auguwu","floofy.dev"],"categories":["TypeScript"],"sub_categories":[],"readme":"# 🐻‍❄️⚗️ @augu/fastify-nitro\n\n\u003e _Experimental [Nitro](https://nitro.unjs.io) preset to export a Nitro server as middleware for fastify_\n\n**@augu/fastify-nitro** is my little preset for building [Nitro](https://nitro.unjs.io) applications that expose a [fastify](https://fastify.io) server or middleware export.\n\n\u003e **Note**: Why did you create this?\n\u003e\n\u003e I made this library to easily integrate fastify with Nitro (or Nuxt 3) so I can have other handlers bound to fastify and I don't really like how server middleware works or is defined, I rather just do it at the application level, not at the meta-framework level.\n\n## Usage\n\n```shell\n$ npm i --save-dev @augu/fastify-nitro\n$ yarn add -D @augu/fastify-nitro\n```\n\n\u003e **nitro.config.ts**\n\n```ts\nimport { defineNitroConfig } from 'nitropack';\n\nexport default defineNitroConfig({\n    preset: '@augu/fastify-nitro'\n});\n```\n\n## Nuxt Usage\n\nTo use this plugin with Nuxt 3, you just need to use `NITRO_PRESET=@augu/fastify-nitro` or add it in your Nuxt configuration:\n\n```ts\nexport default defineNuxtConfig({\n    nitro: {\n        preset: '@augu/fastify-nitro'\n    }\n});\n```\n\n## Base URL\n\nThis preset respects the **baseURL** option in the Nitropack configuration. You will need to set the `prefix` to be usuable so fastify knows how to use it!\n\n\u003e **nitro.config.ts**\n\n```ts\nimport { defineNitroConfig } from 'nitropack';\n\nexport default defineNitroConfig({\n    preset: '@augu/fastify-nitro',\n    baseURL: '/some-url'\n});\n```\n\n\u003e **server.js**\n\n```js\nconst nitroPlugin = await import('./.output/server/index.mjs');\n\napp.register(nitroPlugin, {\n    // It has to be the same as `baseURL` in nitro.config.ts or it will\n    // error.\n    prefix: '/some-url'\n});\n```\n\n## Contributing\n\nThanks for considering contributing to **@augu/fastify-nitro**! Before you boop your heart out on your keyboard ✧ ─=≡Σ((( つ•̀ω•́)つ, we recommend you to do the following:\n\n-   Read the [Code of Conduct](./.github/CODE_OF_CONDUCT.md)\n-   Read the [Contributing Guide](./.github/CONTRIBUTING.md)\n\nIf you read both if you're a new time contributor, now you can do the following:\n\n-   [Fork me! ＊\\*♡( ⁎ᵕᴗᵕ⁎ ）](https://github.com/auguwu/nitro-preset/fork)\n-   Clone your fork on your machine: `git clone https://github.com/your-username/fastify-nitro`\n-   Create a new branch: `git checkout -b some-branch-name`\n-   Run `corepack enable` and use `yarn` for this project\n-   BOOP THAT KEYBOARD!!!! ♡┉ˏ͛ (❛ 〰 ❛)ˊˎ┉♡\n-   Commit your changes onto your branch: `git commit -am \"add features （｡\u003e‿‿\u003c｡ ）\"`\n-   Push it to the fork you created: `git push -u origin some-branch-name`\n-   Submit a Pull Request and then cry! ｡･ﾟﾟ･(థ Д థ。)･ﾟﾟ･｡\n\n## License\n\n**@augu/nitro-preset** is released under the **MIT License** with love by [Noel](https://floofy.dev)! :polar_bear::purple_heart:\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FAugustArchive%2Ffastify-nitro","html_url":"https://awesome.ecosyste.ms/projects/github.com%2FAugustArchive%2Ffastify-nitro","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FAugustArchive%2Ffastify-nitro/lists"}