{"id":15769707,"url":"https://github.com/exortek/remix-fastify","last_synced_at":"2025-04-21T04:31:36.217Z","repository":{"id":257808816,"uuid":"865044189","full_name":"ExorTek/remix-fastify","owner":"ExorTek","description":"Fastify server request handler for Remix","archived":false,"fork":false,"pushed_at":"2025-01-22T11:57:02.000Z","size":1157,"stargazers_count":6,"open_issues_count":0,"forks_count":2,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-04-16T16:45:52.359Z","etag":null,"topics":["fastify","fastify-plugin","remix"],"latest_commit_sha":null,"homepage":"https://www.npmjs.com/package/@exortek/remix-fastify","language":"JavaScript","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/ExorTek.png","metadata":{"files":{"readme":"README.md","changelog":null,"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,"publiccode":null,"codemeta":null}},"created_at":"2024-09-29T20:46:05.000Z","updated_at":"2025-01-22T11:57:05.000Z","dependencies_parsed_at":null,"dependency_job_id":"af9eae9d-d786-48d5-b8b3-46fb757e70be","html_url":"https://github.com/ExorTek/remix-fastify","commit_stats":{"total_commits":14,"total_committers":2,"mean_commits":7.0,"dds":0.1428571428571429,"last_synced_commit":"69b78fe9178938fc88ab706453a13822e655ef64"},"previous_names":["exortek/remix-fastify"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ExorTek%2Fremix-fastify","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ExorTek%2Fremix-fastify/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ExorTek%2Fremix-fastify/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ExorTek%2Fremix-fastify/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ExorTek","download_url":"https://codeload.github.com/ExorTek/remix-fastify/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":249996098,"owners_count":21358063,"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","remix"],"created_at":"2024-10-04T14:04:25.055Z","updated_at":"2025-04-21T04:31:35.871Z","avatar_url":"https://github.com/ExorTek.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# @exortek/remix-fastify\n\nFastify plugin for Remix.\n\n### Compatibility\n\n| Plugin version | Fastify version |\n|----------------|:---------------:|\n| `^1.x`         |     `^5.x`      |\n\n## Installation\n\n```bash\nnpm install @exortek/remix-fastify\n```\n\nOR\n\n```bash\nyarn add @exortek/remix-fastify\n```\n\n## Usage\n\nCommonJS:\n\n```javascript\nconst fastify = require('fastify');\nconst remixFastify = require(\"@exortek/remix-fastify\");\n\nconst app = fastify();\n\napp.register(remixFastify({\n    buildDirectory: 'build', // default\n    clientDirectory: 'client', // default\n    serverDirectory: 'server', // default\n    serverBuildFile: 'index.js', // default\n    mode: process.env.NODE_ENV || 'development', // default\n    fastifyStaticOptions: {}, // default\n    viteOptions: {}, // default\n}));\n\napp.listen({port: 3000, host: 'localhost'}, (err, address) =\u003e {\n    if (err) {\n        console.error(err);\n    }\n    console.log(`Server listening at ${address}`);\n});\n```\n\nESM:\n\n```javascript\nimport fastify from 'fastify';\nimport remixFastify from \"@exortek/remix-fastify\";\n\nconst app = fastify();\n\napp.register(remixFastify({\n    buildDirectory: 'build', // default\n    clientDirectory: 'client', // default\n    serverDirectory: 'server', // default\n    serverBuildFile: 'index.js', // default\n    mode: process.env.NODE_ENV || 'development', // default\n    fastifyStaticOptions: {}, // default\n    viteOptions: {}, // default\n}));\n\napp.listen({port: 3000, host: 'localhost'}, (err, address) =\u003e {\n    if (err) {\n        console.error(err);\n    }\n    console.log(`Server listening at ${address}`);\n});\n```\n## How to use in Project\n\nSet up your project as per the [Remix documentation](https://remix.run/docs/en/main/other-api/create-remix). Then,\nfollow the steps below:\n\n1. Create a new file in the root of your project called `server.mjs`.\n2. Add the following code to the file:\n\n```javascript\nimport fastify from 'fastify';\nimport remixFastify from \"@exortek/remix-fastify\";\n\nconst app = fastify();\n\napp.register(remixFastify({\n    buildDirectory: 'build', // default\n    clientDirectory: 'client', // default\n    serverDirectory: 'server', // default\n    serverBuildFile: 'index.js', // default\n    mode: process.env.NODE_ENV || 'development', // default\n    fastifyStaticOptions: {}, // default\n    viteOptions: {}, // default\n}));\n\napp.listen({port: 3000, host: 'localhost'}, (err, address) =\u003e {\n    if (err) {\n        console.error(err);\n    }\n    console.log(`Server listening at ${address}`);\n});\n```\n\n3. Add the following script to your `package.json`:\n\n```json\n{\n  \"scripts\": {\n    \"dev\": \"cross-env NODE_ENV=development node server.mjs\",\n    \"start\": \"cross-env NODE_ENV=production node server.mjs\"\n  }\n}\n```\n\n4. Run the following command to start the server:\n\n```bash\nnpm run dev\nnpm run start\n```\n\nOR\n\n```bash\nyarn dev\nyarn start\n```\n\n## License\n\n**[MIT](https://github.com/ExorTek/remix-fastify/blob/master/LICENSE)**\u003cbr\u003e\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fexortek%2Fremix-fastify","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fexortek%2Fremix-fastify","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fexortek%2Fremix-fastify/lists"}