Skip to content

lazy-eggplant/vs.http

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

9 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

vs.http is an HTTP server based on mongoose and vs.templ.
It serves as demo project for vs.templ, but it works and might have some practical value.

It has a quite small memory footprint, mostly thanks to mongoose and pugixml which are decently optimized.
If you are targetting embedded devices, you might want to configure some flags in pugixml to further reduce its memory usage.

Building

Important

You will not be able to build it with normal meson for an unrelated issue whose PR is in waiting list.
For now, you will need to patch meson manually if you really want to build this example.
Patch has been added to meson 1.7.

The current build is explicitly using static deps for portability.

meson setup build
meson install --skip-subprojects -C build

Usage

After building it, run this to see the default example.

cd example
../build/vs.http

It has an internal default profile for the folder layout.
Still, a custom profile can be passed as the first and only argument.

Not in scope

But PRs are accepted:

  • File streaming
  • Cache HTTP headers to avoid reloads
  • A configurable cache of pre-generated files

PRs will not be accepted:

  • Support for methods other than GET. There is no way to support actions able to mutate the state, or externally get data without introducing other scripting capabilities or dynamic library loading.

Licence

It is forced to GPL-2.0 by mongoose.
Clearly this does not cover your own files and configuration, only the engine itself.

About

An HTTP server based on vs.templ

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published