Skip to content

cpp-pre/oatpppre-staticfileserver

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

8 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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 : [email protected]

About

Static file server module for oatpp

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages