{"id":49619175,"url":"https://github.com/nick-hio/fastify-jsx","last_synced_at":"2026-05-05T00:46:27.955Z","repository":{"id":331372160,"uuid":"1111945275","full_name":"nick-hio/fastify-jsx","owner":"nick-hio","description":"Fastify plugin for sending JSX as HTML responses.","archived":false,"fork":false,"pushed_at":"2026-01-04T21:59:04.000Z","size":35,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2026-05-05T00:46:09.442Z","etag":null,"topics":["fastify","fastify-plugin","jsx","plugin","react","react-dom","typescript"],"latest_commit_sha":null,"homepage":"https://www.npmjs.com/package/fastify-jsx","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/nick-hio.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,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2025-12-07T23:15:50.000Z","updated_at":"2026-01-05T19:16:01.000Z","dependencies_parsed_at":null,"dependency_job_id":null,"html_url":"https://github.com/nick-hio/fastify-jsx","commit_stats":null,"previous_names":["nick-hio/fastify-jsx"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/nick-hio/fastify-jsx","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nick-hio%2Ffastify-jsx","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nick-hio%2Ffastify-jsx/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nick-hio%2Ffastify-jsx/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nick-hio%2Ffastify-jsx/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/nick-hio","download_url":"https://codeload.github.com/nick-hio/fastify-jsx/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nick-hio%2Ffastify-jsx/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":32631058,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-04T10:08:07.713Z","status":"ssl_error","status_checked_at":"2026-05-04T10:08:02.005Z","response_time":58,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"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","fastify-plugin","jsx","plugin","react","react-dom","typescript"],"created_at":"2026-05-05T00:46:27.320Z","updated_at":"2026-05-05T00:46:27.946Z","avatar_url":"https://github.com/nick-hio.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# fastify-jsx\n\n[![NPM version](https://img.shields.io/npm/v/fastify-jsx.svg?style=flat)](https://www.npmjs.com/package/fastify-jsx)\n\nFastify plugin for sending JSX as HTML responses.\n\n## Install\n\n```bash\npnpm install fastify-jsx\nnpm install fastify-jsx\nbun add fastify-jsx\nyarn add fastify-jsx\n```\n\n### Compatibility\n\n| Plugin Version | Fastify Version |\n|----------------|-----------------|\n| `^0.1.x`       | `^5.x`          |\n\n## Usage\n\n```jsx\n// ESM\nimport Fastify from 'fastify'\nimport fastifyJsx from 'fastify-jsx'\n\nconst fastify = Fastify({ logger: true })\nfastify.register(fastifyJsx)\n\nfastify.get('/', () =\u003e (\n    \u003cdiv\u003eJSX Payload\u003c/div\u003e\n))\nfastify.get('/send', (request, reply) =\u003e {\n    reply.send(\u003cdiv\u003eJSX Payload\u003c/div\u003e)\n})\n```\n\n```js\n// CJS\nconst fastify = require('fastify')({ logger: true })\nfastify.register(require('fastify-jsx'))\n\nfastify.get('/', () =\u003e (\n    \u003cdiv\u003eJSX Payload\u003c/div\u003e\n))\nfastify.get('/send', (request, reply) =\u003e {\n    reply.send(\u003cdiv\u003eJSX Payload\u003c/div\u003e)\n})\n```\n\n## Options\n\n### `render`\n\nChooses the JSX rendering function from `react-dom/server`. Defaults to `'static'`.\n\n- `'static'`: Uses the `renderToStaticMarkup` function. Renders static HTML without React attributes.\n- `'string'`: Uses the `renderToString` function. Renders HTML with React attributes for client-side hydration.\n\n```jsx\n// ESM\nfastify.register(fastifyJsx) // Render to static HTML\nfastify.register(fastifyJsx, { render: 'string' }) // Render to HTML with hydration\n```\n\n```jsx\n// CJS\nfastify.register(require('fastify-jsx')) // Render to static HTML\nfastify.register(require('fastify-jsx'), { render: 'string' }) // Render to HTML with hydration\n```\n\n## License\n\nLicensed under [MIT](./LICENSE).\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnick-hio%2Ffastify-jsx","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fnick-hio%2Ffastify-jsx","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnick-hio%2Ffastify-jsx/lists"}