lukeed / sirv

An optimized middleware & CLI application for serving static files~!
MIT License
1.07k stars 58 forks source link

Option to serve with path #87

Closed cotyhamilton closed 3 years ago

cotyhamilton commented 3 years ago

Would be cool to have an option to serve under a path other than root.

For example

sirv --single --dev --basepath MyApp

Which would serve it at localhost:5000/MyApp

lukeed commented 3 years ago

The only routing sirv will do is 1:1 mapping of requests to file structure. If you need something more, you should stand up a Polka or any proxy server.

In this case, you could skip all that and create assets inside /public/MyApp and then sirv public

Hope that helps

cotyhamilton commented 3 years ago

Alright, thank you for the suggestion