@toisu/static

5.0.0 • 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);

Readme

Keywords

Package Sidebar

Install

npm i @toisu/static

Weekly Downloads

53

Version

5.0.0

License

MIT

Unpacked Size

4.45 kB

Total Files

6

Last publish

Collaborators

  • qubyte