@toisu/static

    4.0.3 • Public • Published

    toisu-static

    A tiny wrapper around serve-static for Toisu!

    This module accepts the same arguments as serve-static.

    Example

    import http from 'http';
    import Toisu from '@toisu/toisu';
    import serveStatic from '@toisu/static';
    
    const app = new Toisu();
    
    // Serve the "public" directory (relative to the app root).
    app.use(serveStatic('public'));
    
    http.createServer(app.requestHandler).listen(3000);

    Keywords

    Install

    npm i @toisu/static

    DownloadsWeekly Downloads

    555

    Version

    4.0.3

    License

    MIT

    Unpacked Size

    4.33 kB

    Total Files

    7

    Last publish

    Collaborators

    • qubyte