Clone this repo:
  1. 70112b6 Cleanup (#20) by Kevin Moore · 10 weeks ago master 0.2.5
  2. b6e30c8 Merge https://github.com/dart-lang/shelf_static/pull/19 by Kevin Moore · 3 months ago
  3. dd42ca9 Tweak changelog by Kevin Moore · 3 months ago
  4. 7caaf34 Bumped version number to 0.2.5 by Matthew Barbour · 4 months ago
  5. c38a811 Added changelog entry, changed contentTypeResolver null checker to use a null-aware operator. by Matthew Barbour · 4 months ago

shelf_static is a Handler for the Dart shelf package.

Build Status

Example

import 'package:shelf/shelf_io.dart' as io;
import 'package:shelf_static/shelf_static.dart';

void main() {
  var handler = createStaticHandler('example/files', 
      defaultDocument: 'index.html');

  io.serve(handler, 'localhost', 8080);
}