lt-web-server 1.0.5
Super lightweight static web server using vibe.d
To use this package, run the following command in your project's root directory:
Manual usage
Put the following dependency into your project's dependences section:
lt-web-server
Simple lightweight static web server using Vibe.D and language D.
Usage:
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
- Registered by Jairo Velasco
- 1.0.5 released 8 years ago
- jairov4/lt-web-server
- MIT
- © 2016 Jairo Andres Velasco
- Authors:
- Dependencies:
- vibe-d, jsonizer
- Versions:
-
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 - Download Stats:
-
-
0 downloads today
-
0 downloads this week
-
0 downloads this month
-
84 downloads total
-
- Score:
- 0.6
- Short URL:
- lt-web-server.dub.pm