Clone this repo:
  1. 85a3a8c Fixes for package score: longer description and correct example filename (#56) by Kevin Moore · 7 weeks ago master
  2. b8e5137 Correctly support HEAD (#54) by Kevin Moore · 7 weeks ago
  3. d086aa3 Merge pull request #52 from dart-lang/franklinyow-patch-1 by Franklin Yow · 3 months ago
  4. e6f831d Update LICENSE by Franklin Yow · 3 months ago
  5. f7e466b Remove dep overrides, test on oldest supported SDK (#51) by Kevin Moore · 3 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);
}