ipkn / crow

Crow is very fast and easy to use C++ micro web framework (inspired by Python Flask)
BSD 3-Clause "New" or "Revised" License
7.47k stars 889 forks source link

returning js css image files #68

Open rutlang opened 9 years ago

rutlang commented 9 years ago

how do you return external files (js, css, images)?

acron0 commented 9 years ago

In essence, crude static file serving is just reading the file from the file system, setting the appropriate headers/mime-types and sending it as a response.

Alternatively, if you're using crow behind a reverse proxy (such as nginix) then you could use that for serving statics.

I might throw up a middleware example onto the crow-contrib.