Clone this repo:
  1. 3558aa3 No scheduled test (#23) by Kevin Moore · 3 weeks ago master
  2. 2b908af Merge pull request #24 from dart-lang/fix-imports by Gary Roumanis · 3 weeks ago
  3. ccb925d remove unused imports by Gary Roumanis · 4 weeks ago
  4. 2295fea Add a function to serve a single file (#22) by Natalie Weizenbaum · 5 weeks ago 0.2.6
  5. 70112b6 Cleanup (#20) by Kevin Moore · 6 months ago 0.2.5

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);
}