ufront / ufront-mvc

The core MVC framework that powers ufront
MIT License
17 stars 15 forks source link

Serving static contents in virtual path #47

Closed kevinresol closed 6 years ago

kevinresol commented 8 years ago

In nodejs, static files are served through express.static, which can be configured to mount a harddisk parth to a virtual path.

e.g.: express.static('/files', 'uf-contents/') then every url request starts with /files will trigger express to find static files in the uf-contents folder

Shall we add a config to ufrontApp to set such routes? like staticPaths: [new Pair('/files','uf-contents'), ...]

But on neko and php static files are served by the web server (nginx, apache), I am not sure what we can do there.

kevinresol commented 6 years ago

Cleaning up my old issues and I think this is no longer needed.