tree: 832fa8eb92147d9a73801e4baf81c8cd6dfabda9 [path history] [tgz]
  1. example/
  2. lib/
  3. .gitignore
  4. .test_config
  5. .travis.yml
  6. BUILD.gn
  7. CHANGELOG.md
  8. codereview.settings
  9. CONTRIBUTING.md
  10. LICENSE
  11. pubspec.yaml
  12. 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);
}