Skip to content
ohsudo, Home

Tags

#vite

single-page app
Networking

Nginx for a React or Vite single-page app: routes, caching and an API proxy

Serve a React, Vue or Vite single-page app with Nginx: fix 404s on refresh with try_files, cache hashed assets, avoid caching index.html, and proxy /api to your backend.

Beginner · 3 min read