toisu-static

A simple wrapper around serve-static for Toisu!


Keywords
toisu, static
License
MIT
Install
npm install toisu-static@1.1.1

Documentation

toisu-static

Greenkeeper badge

A tiny wrapper around serve-static for Toisu!

This module accepts the same arguments as serve-static.

Example

const http = require('http');
const Toisu = require('toisu');
const serveStatic = require('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);