Skip to content

Commit

Permalink
Update README.md
Browse files Browse the repository at this point in the history
  • Loading branch information
travis-r6s authored Jan 17, 2024
1 parent 48ba846 commit a3283a8
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@

[Demo Site](https://brave-dune-045f79d0f.4.azurestaticapps.net)

> Note: There is a project called [Vinxi](https://github.com/nksaraf/vinxi) which turns all this into a framework
A 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.

I 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.
Expand Down

0 comments on commit a3283a8

Please sign in to comment.