vercel / serve

Static file serving and directory listing
https://npmjs.com/package/serve
MIT License
9.36k stars 691 forks source link

Add ability to serve SPA from non root #556

Open jbojcic1 opened 5 years ago

jbojcic1 commented 5 years ago

Sometimes you need to serve the SPA from non root directory. For example let's say that I have a react app and I need to serve it on /portal, in my index html I will have paths like /portal/static/css/main.dce7bb36.chunk.css Currently server is just returning index.html for those paths.

TomPradat commented 4 years ago

Any news on this ? This could be nice

warren-bank commented 2 years ago

shameless self-promotion alert:
this feature is available in my @warren-bank/serve fork of serve

option 1:

option 2: