This is a simple static file server for oatpp in order to correctly distribute files with their according content type.
Add the following to your oatpp app :
#include <oatpppre/StaticFilesHandler.hpp>
...
auto router = components.httpRouter.getObject();
oatpppre::StaticFilesHandler::mountAtRoute(router, "/files/*", "."); // Add the static file handle
See full example in examples/staticfileserver.cpp
In .tipi/deps
:
{
"cpp-pre/oatpppre-staticfileserver" : {}
}
tipi . -t linux-cxx17
This project is made by tipi.build and works in conjunction with oatpp but isn't related by any means to the oatpp authors.
Maintainer : [email protected]