Clone this repo:
  1. fa30419 stable null safety release (#49) by Jacob MacDonald · 2 days ago master 1.0.0
  2. bafde9e Migrate to null safety (#47) by Xavier H · 3 days ago
  3. 40e7772 Allow latest shelf (null-safe) (#48) by Kevin Moore · 4 weeks ago v0.2.9+2
  4. 6f50b67 Migrate to GitHub Actions (#46) by Alexander Thomas · 5 weeks ago
  5. 0e1c132 Bump `mime` dependency (#45) by Emmanuel Garcia · 2 months ago v0.2.9+1

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);
}