lt-web-server 1.0.5

Super lightweight static web server using vibe.d

To use this package, put the following dependency into your project's dependencies section:



Simple lightweight static web server using Vibe.D and language D.


This web server can be configured using a simple settings file called web.json

    "useServerCache": false,
    "clientCacheMaxAge": 0,
    "routes": [
        {"path": "/my-file",         "type": "file", "arg": "source/test.html"},
        {"path": "/videos/my-video", "type": "file", "arg": "source/video.mp4"},
        {"path": "*",                "type": "path", "arg": "source/"}

The routes will be evaluated in order that appears in the file. Therefore, is recomended use the fallback route as last item. The type path allows to serve a path with wildcards using a base folder. The type file allows to serve a path using a static file. The clientCacheMaxAge is an integer value that specify the HTTP Cache-Control max-age in seconds. It is useful to instruct clients to keep a valid copy of files for an specified duration reducing the requests need. A value of zero will disable this header. The default value is 0.

To run the server use:

dub run lt-web-server -- --settings=/absolute/path/web.json

Authors:Jairo Andres Velasco (jairov4)

Dependencies:vibe-d, jsonizer

1.0.5 2016-Jul-06
1.0.4 2016-Jul-05
1.0.3 2016-Jul-05
1.0.2 2016-Jun-26
1.0.1 2016-Jun-26
Show all 7 versions

statistics are temporarily disabled.