mini-static 0.16.0

A secure, async static file server with streaming, traversal protection, and connection limits.
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
// Tiny demo script — deliberately written with comments and loose whitespace so the
// effect of `Server::with_minify()` is visible in the served bytes (check the response
// size, or view-source, and compare against this file on disk).

function announceLoad() {
    // Find the footer and note that JS actually ran, not just parsed.
    var footer = document.querySelector( "footer p" );

    if ( footer ) {
        footer.textContent += "  (app.js loaded)";
    }
}

document.addEventListener( "DOMContentLoaded", announceLoad );