mast basic test working
diff --git a/lib/shelf_static.dart b/lib/shelf_static.dart
index 9a6e949..dbaa478 100644
--- a/lib/shelf_static.dart
+++ b/lib/shelf_static.dart
@@ -1 +1,31 @@
-library shelf_static;
\ No newline at end of file
+library shelf_static;
+
+import 'dart:io';
+
+import 'package:path/path.dart' as p;
+import 'package:shelf/shelf.dart';
+
+// directory listing
+// default document
+// sym links
+// mime type handling
+
+Handler getHandler(String fileSystemPath) {
+  return (Request request) {
+    var rootDir = new Directory(fileSystemPath);
+    var rootPath = rootDir.resolveSymbolicLinksSync();
+
+    var segs = [rootPath]..addAll(request.pathSegments);
+
+    var requestedPath = p.joinAll(segs);
+    var file = new File(requestedPath);
+
+    return file.resolveSymbolicLinks().then((String resolvedPath) {
+      if(!p.isWithin(rootPath, resolvedPath)) {
+        throw 'Requested path ${request.pathInfo} resolved to $resolvedPath is not under $rootPath.';
+      }
+
+      return new Response.ok(file.openRead());
+    });
+  };
+}
diff --git a/lib/src/util.dart b/lib/src/util.dart
new file mode 100644
index 0000000..7a305da
--- /dev/null
+++ b/lib/src/util.dart
@@ -0,0 +1,12 @@
+// Copyright (c) 2014, the Dart project authors.  Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+
+library shelf_static.util;
+
+import 'dart:async';
+
+import 'package:stack_trace/stack_trace.dart';
+
+/// Like [Future.sync], but wraps the Future in [Chain.track] as well.
+Future syncFuture(callback()) => Chain.track(new Future.sync(callback));
diff --git a/pubspec.yaml b/pubspec.yaml
index abb64b7..e3acc71 100644
--- a/pubspec.yaml
+++ b/pubspec.yaml
@@ -1,2 +1,8 @@
 name: shelf_static
-description: A pub package 
+version: 0.0.0-dev
+description: Static file server support for Shelf
+dependencies:
+  shelf: '>=0.2.0 <0.3.0'
+dev_dependencies:
+  hop: '>=0.30.2 <0.31.0'
+  scheduled_test: '>=0.10.0 <0.11.0'
diff --git a/test/basic_file_test.dart b/test/basic_file_test.dart
new file mode 100644
index 0000000..d41c6d0
--- /dev/null
+++ b/test/basic_file_test.dart
@@ -0,0 +1,53 @@
+library shelf_static.basic_file_test;
+
+import 'dart:io';
+import 'package:scheduled_test/descriptor.dart' as d;
+import 'package:scheduled_test/scheduled_test.dart';
+
+import 'package:shelf_static/shelf_static.dart';
+import 'test_util.dart';
+
+void main() {
+
+  setUp(() {
+    var tempDir;
+    schedule(() {
+      return Directory.systemTemp.createTemp('shelf_static-test-').then((dir) {
+        tempDir = dir;
+        d.defaultRoot = tempDir.path;
+      });
+    });
+
+    d.file('root.txt', 'root txt').create();
+    d.dir('files', [
+        d.file('test.txt', 'test txt content')
+    ]).create();
+
+    currentSchedule.onComplete.schedule(() {
+      print(d.defaultRoot);
+      d.defaultRoot = null;
+      //return tempDir.delete(recursive: true);
+    });
+  });
+
+  test('access root file', () {
+    schedule(() {
+
+      var handler = getHandler(d.defaultRoot);
+
+      return makeRequest(handler, '/root.txt').then((response) {
+        expect(response.statusCode, HttpStatus.OK);
+        expect(response.readAsString(), completion('root txt'));
+      });
+    });
+  });
+
+  // root file success, fail
+  // pathed file success, fail
+
+  // evil URL fixes
+
+  // hosted via other path: success, fail
+
+  // no sym links
+}
diff --git a/test/test_util.dart b/test/test_util.dart
new file mode 100644
index 0000000..8c12c19
--- /dev/null
+++ b/test/test_util.dart
@@ -0,0 +1,17 @@
+// Copyright (c) 2014, the Dart project authors.  Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+
+library shelf_static.test_util;
+
+import 'dart:async';
+
+import 'package:shelf/shelf.dart';
+import 'package:shelf_static/src/util.dart';
+
+/// Makes a simple GET request to [handler] and returns the result.
+Future<Response> makeRequest(Handler handler, String path) =>
+    syncFuture(() => handler(_fromPath(path)));
+
+Request _fromPath(String path) => new Request(path, '', 'GET', '', '1.1', 0,
+    Uri.parse('http://localhost' + path), {});