Skip to content

Latest commit

 

History

History
34 lines (26 loc) · 845 Bytes

File metadata and controls

34 lines (26 loc) · 845 Bytes

pre-oatpp-staticfileserver

This is a simple static file server for oatpp in order to correctly distribute files with their according content type.

Usage

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

Add it to your project

In .tipi/deps :

{
  "cpp-pre/oatpppre-staticfileserver" : {}
}

Compiling

tipi . -t linux-cxx17

Disclaimer

This project is made by tipi.build and works in conjunction with oatpp but isn't related by any means to the oatpp authors.

Contact

Maintainer : damien@tipi.build