lwsjs / local-web-server

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

Implementing cache-control config #34

Closed web-padawan closed 7 years ago

web-padawan commented 8 years ago

For now, we only have option for disabling cache. Although it is useful, sometimes we'd like to test how does our app performs with some cached files. I suggest using koa-cache-control, as it is easy to implement and to set maxAge and other headers for local development needs.

75lb commented 8 years ago

sounds useful, thanks - i will look at this tonight 👍

75lb commented 8 years ago

just to keep you updated, i am beta-testing version 2 of local-web-server.. it has been re-designed to be simple to add your own middleware and command-line options..

you can see an example of building a simple static server with cache-control here.. i just need to write the documentation..