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

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