{"id":20240918,"url":"https://github.com/aquapi/react-ssr","last_synced_at":"2026-06-05T03:32:17.684Z","repository":{"id":134503853,"uuid":"487311225","full_name":"aquapi/react-ssr","owner":"aquapi","description":"React SSR","archived":false,"fork":false,"pushed_at":"2022-05-09T12:42:30.000Z","size":11,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-01-14T01:34:10.713Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/aquapi.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"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":"2022-04-30T15:21:58.000Z","updated_at":"2022-04-30T15:22:15.000Z","dependencies_parsed_at":"2023-06-16T16:15:18.287Z","dependency_job_id":null,"html_url":"https://github.com/aquapi/react-ssr","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/aquapi%2Freact-ssr","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/aquapi%2Freact-ssr/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/aquapi%2Freact-ssr/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/aquapi%2Freact-ssr/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/aquapi","download_url":"https://codeload.github.com/aquapi/react-ssr/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":241686832,"owners_count":20003112,"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":[],"created_at":"2024-11-14T08:50:33.538Z","updated_at":"2026-06-05T03:32:17.648Z","avatar_url":"https://github.com/aquapi.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# React SSR\nA library for SSR using React 18\n\n## Installation\n```bash\n# Using NPM\nnpm i react-ss\n\n# Using yarn\nyarn add react-ss\n```\n\nMake sure you have React and React DOM installed.\n\n## Example usage\n```javascript\nimport ssr from \"react-ss\";\nimport express from \"express\";\n\n// Create the root to render\n// Use this with nodemon to rebuild when anything change\nawait ssr.build();\n\n// Create an express server\nconst app = express();\n\n// Serve the hydrate file\napp.use(express.static(\".root\"));\n\n// Render the homepage on every request (\"./pages/home.js\")\napp.use(async (req, res) =\u003e {\n    const content = await ssr.renderToHTML(\"/home\");\n    res.end(content);\n});\n\n// Start the server\napp.listen(8080);\n```\n\n# Documentation\n- `build(): Promise\u003cvoid\u003e`: Generate a `.root` directory. `renderToHTML` can't work before calling this.\n- `renderToHTML(): Promise\u003cstring\u003e`: Render a page to HTML string. You need to serve the `.root` directory as a static for this to work.","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Faquapi%2Freact-ssr","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Faquapi%2Freact-ssr","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Faquapi%2Freact-ssr/lists"}