lrhn / shelf_static

A static file handler for the Dart Shelf server model

Home Page:https://pub.dartlang.org/packages/shelf_static

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

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

About

A static file handler for the Dart Shelf server model

https://pub.dartlang.org/packages/shelf_static

License:BSD 3-Clause "New" or "Revised" License


Languages

Language:Dart 99.4%Language:HTML 0.6%