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