blob: ffe0e26cc5d27bfc177ee47fb163059d0ba2579c [file] [log] [blame] [view]
`shelf_static` is a `Handler` for the Dart `shelf` package.
[![Build Status](https://travis-ci.org/dart-lang/shelf_static.svg?branch=master)](https://travis-ci.org/dart-lang/shelf_static?branch=master)
[![Coverage Status](https://coveralls.io/repos/dart-lang/shelf_static/badge.svg?branch=master&service=github)](https://coveralls.io/github/dart-lang/shelf_static?branch=master)
### Example
```dart
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);
}
```