Clone this repo:
  1. b6e30c8 Merge https://github.com/dart-lang/shelf_static/pull/19 by Kevin Moore · 7 days ago master
  2. dd42ca9 Tweak changelog by Kevin Moore · 7 days ago
  3. 7caaf34 Bumped version number to 0.2.5 by Matthew Barbour · 3 weeks ago
  4. c38a811 Added changelog entry, changed contentTypeResolver null checker to use a null-aware operator. by Matthew Barbour · 3 weeks ago
  5. f54ac29 Documentation for new contentTypeResolver option. by Matthew Barbour · 3 weeks ago

shelf_static is a Handler for the Dart shelf package.

Build Status Coverage 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);
}