Clone this repo:
  1. eecf576 Update .gitignore to new `dart_tool` pub cache (#31) by BC Ko · 29 hours ago master
  2. 69c87e9 Remove deprecated `dart:io` constant uses. (#30) by Lasse R.H. Nielsen · 4 days ago v0.2.7+1
  3. 43def5d Remove upper case constants (#28) by Lasse R.H. Nielsen · 3 weeks ago
  4. 7fcc3dd prep for release (#27) by Gary Roumanis · 5 months ago v0.2.7
  5. 3558aa3 No scheduled test (#23) by Kevin Moore · 7 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);
}