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

shelf_static is a Handler for the Dart shelf package.

Build Status Coverage 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);
}