shelf_static 0.1.4+4 copy "shelf_static: ^0.1.4+4" to clipboard
shelf_static: ^0.1.4+4 copied to clipboard

outdatedDart 1 only

Static file server support for Shelf

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