tree: 8d9276ba82d4981cdc884c57d8a8647827001659 [path history] [tgz]
  1. example/
  2. lib/
  3. .gitignore
  4. .test_config
  5. .travis.yml
  6. analysis_options.yaml
  7. BUILD.gn
  8. CHANGELOG.md
  9. codereview.settings
  10. CONTRIBUTING.md
  11. LICENSE
  12. pubspec.yaml
  13. README.md
shelf_static/README.md

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