Added option to allow for mimetype lookup via magic numbers

Closes https://github.com/dart-lang/shelf_static/pull/12
tree: 3ecbe3e56a55e6cf5559ef794ab65fe60302d9db
  1. .analysis_options
  2. .gitignore
  3. .travis.yml
  4. CHANGELOG.md
  5. CONTRIBUTING.md
  6. LICENSE
  7. README.md
  8. codereview.settings
  9. example/
  10. lib/
  11. pubspec.yaml
  12. test/
  13. tool/
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);
}