{"id":24015403,"url":"https://github.com/travis-r6s/nitro-vite","last_synced_at":"2026-05-16T19:06:54.141Z","repository":{"id":217667438,"uuid":"744490642","full_name":"travis-r6s/nitro-vite","owner":"travis-r6s","description":"A simple demo to show how Nitro + Vite can be used together as an MPA.","archived":false,"fork":false,"pushed_at":"2024-01-26T14:00:06.000Z","size":98,"stargazers_count":3,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-01-08T07:55:36.166Z","etag":null,"topics":["azure-functions","nitro","unjs","vite"],"latest_commit_sha":null,"homepage":"https://brave-dune-045f79d0f.4.azurestaticapps.net","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/travis-r6s.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}},"created_at":"2024-01-17T12:08:41.000Z","updated_at":"2024-12-05T02:10:39.000Z","dependencies_parsed_at":"2024-01-26T15:24:35.747Z","dependency_job_id":"7c8af91d-c289-442b-b539-107932beaab6","html_url":"https://github.com/travis-r6s/nitro-vite","commit_stats":null,"previous_names":["travis-r6s/nitro-vite"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/travis-r6s%2Fnitro-vite","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/travis-r6s%2Fnitro-vite/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/travis-r6s%2Fnitro-vite/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/travis-r6s%2Fnitro-vite/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/travis-r6s","download_url":"https://codeload.github.com/travis-r6s/nitro-vite/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":240727551,"owners_count":19848022,"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":["azure-functions","nitro","unjs","vite"],"created_at":"2025-01-08T07:55:28.893Z","updated_at":"2026-05-16T19:06:49.072Z","avatar_url":"https://github.com/travis-r6s.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Nitro + Vite Minimal Starter\n\n[Demo Site](https://brave-dune-045f79d0f.4.azurestaticapps.net)\n\n\u003e Note: There is a project called [Vinxi](https://github.com/nksaraf/vinxi) which turns all this into an actual framework you could (and probably should) use instead. It also enables you to do SSR 👀\n\nA simple demo to show how Nitro + Vite can be used together as an MPA. This means you can have Nitro serve both your API (with routes under the `/routes/*` folder), and your SPA (code located in `/app`, and rendered by the `./renderer.ts` handler), and build this for any hosting platform.\n\nI built this as a POC to see if I could create an MPA for Azure Static Web Apps - I wanted to create a Shopify app which had some middleware to check if the current user is authenticated on their first visit to `/`. With Nitro, I can run this middleware check, and a function either redirects to another API route `/login`, or renders the HTML for the index page, and the browser then loads the assets from the public directory.\n\n## Setup\n\nMake sure to install the dependencies:\n\n```bash\npnpm install\n```\n\n## Development Server\n\nStart the development server on \u003chttp://localhost:3000\u003e\n\n```bash\npnpm run dev\n```\n\n## Production\n\nBuild the application for production:\n\n```bash\npnpm run build\n```\n\nLocally preview production build:\n\n```bash\npnpm run preview\n```\n\nCheck out the [deployment documentation](https://nitro.unjs.io/deploy) for more information.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftravis-r6s%2Fnitro-vite","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ftravis-r6s%2Fnitro-vite","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftravis-r6s%2Fnitro-vite/lists"}