{"id":16622026,"url":"https://github.com/itzderock/bun-elysia-nextjs","last_synced_at":"2025-03-21T14:31:49.580Z","repository":{"id":198523340,"uuid":"700955640","full_name":"ItzDerock/bun-elysia-nextjs","owner":"ItzDerock","description":"Demo showing Bun + Elysia + NextJS (app dir)","archived":false,"fork":false,"pushed_at":"2023-10-05T17:22:35.000Z","size":88,"stargazers_count":52,"open_issues_count":2,"forks_count":6,"subscribers_count":4,"default_branch":"main","last_synced_at":"2025-03-01T07:22:07.458Z","etag":null,"topics":["bun","elysia","end-to-end-typesafe","nextjs","nextjs-app-router"],"latest_commit_sha":null,"homepage":"https://bun-elysia-nextjs-production.up.railway.app/","language":"TypeScript","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/ItzDerock.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}},"created_at":"2023-10-05T16:10:07.000Z","updated_at":"2025-02-10T23:44:17.000Z","dependencies_parsed_at":null,"dependency_job_id":"c4efee8c-31a0-4da7-96cb-b15b92aa40f1","html_url":"https://github.com/ItzDerock/bun-elysia-nextjs","commit_stats":null,"previous_names":["itzderock/bun-elysia-nextjs"],"tags_count":0,"template":true,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ItzDerock%2Fbun-elysia-nextjs","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ItzDerock%2Fbun-elysia-nextjs/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ItzDerock%2Fbun-elysia-nextjs/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ItzDerock%2Fbun-elysia-nextjs/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ItzDerock","download_url":"https://codeload.github.com/ItzDerock/bun-elysia-nextjs/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":244141479,"owners_count":20404837,"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":["bun","elysia","end-to-end-typesafe","nextjs","nextjs-app-router"],"created_at":"2024-10-12T02:49:12.608Z","updated_at":"2025-03-21T14:31:49.294Z","avatar_url":"https://github.com/ItzDerock.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Bun + ElysiaJS + NextJS\n\n\u003c!-- demo video --\u003e\nhttps://github.com/ItzDerock/bun-elysia-nextjs/assets/14848722/5f1c9e70-f2fd-4e21-ae03-4bdbad8215db\n\n[Demo Deployment](https://bun-elysia-nextjs-production.up.railway.app/)\n\nA sample project showing ElysiaJS running as the Next.JS custom server with full end-to-end typesafety similar to tRPC and ts-rest. You get to define the route paths (unlike with tRPC) and no extra boilerplate is needed (unlike with ts-rest contracts). All running on the fast bun runtime.\n\nYou can access Bun globals in React Server Components (for example, Bun.password, Bun.file). Hot Module Reloading is also supported.\n\nTested with bun v1.0.4\n\n## Production Deployment\nSimply run `bun build` and wait for NextJS to build the pages. Then you can start the server in production mode with `bun start` or run the entrypoint with `NODE_ENV` set to `production`. This will serve the built NextJS pages from the .next folder in the process's cwd.\n\nBased on my measurements, this basic app uses 0% CPU on idle and ~280MB of RAM on start. This is compared to normal Node.JS which uses ~400MB for a similar sized app.\n\n### On Railway (nixpacks)\n[Railway](https://railway.app?referralCode=ESBdK3) is a simple cloud deployment platform and with their Nixpacks builder, you can deploy this project with a single click.\nOn their dashboard, just connect your GitHub repo and sit back and relax. \n\n### With Docker\nsoon™️","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fitzderock%2Fbun-elysia-nextjs","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fitzderock%2Fbun-elysia-nextjs","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fitzderock%2Fbun-elysia-nextjs/lists"}