lwsjs / local-web-server

A lean, modular web server for rapid full-stack development.
MIT License
1.21k stars 85 forks source link

option to define multiple static roots #22

Closed 75lb closed 8 years ago

75lb commented 8 years ago

for example, how you would do it express

app.use("/assets", serveStatic("./app/assets"));
app.use("/css", serveStatic("./cheese/css"));
etc.
azerafati commented 2 years ago

Why was this closed?

75lb commented 2 years ago

this ticket is over 6 years old - I think it was closed because you can implement the behaviour in multiple ways with existing features (URL rewriting, custom middleware, possibly even by launching multiple different ws instances with separate --directory options).

azerafati commented 2 years ago

URL rewriting is limited to the same directory root (#45) and launching multiple ws instances won't be on the same port. Could you point to an example with custom middleware?

75lb commented 2 years ago

Have a look on the project wiki, particularly the Creating-middleware page.. let me know if you have any other questions 👍