Removed outdated example – relied on `pub serve`
diff --git a/example/example_server.dart b/example/example_server.dart
deleted file mode 100644
index f591056..0000000
--- a/example/example_server.dart
+++ /dev/null
@@ -1,53 +0,0 @@
-library shelf_static.example;
-
-import 'dart:convert';
-
-import 'package:shelf/shelf.dart';
-import 'package:shelf/shelf_io.dart' as io;
-import 'package:shelf_proxy/shelf_proxy.dart';
-
-const _pubPort = 7777;
-final _encoder = const JsonEncoder.withIndent(' ');
-
-void main() {
- //
- // The api handler responds to requests to '/api' with a JSON document
- // containing an incrementing 'count' value.
- //
- var apiCount = 0;
- var apiHandler = (Request request) {
- if (request.url.path == '/api') {
- apiCount++;
- var json = _encoder.convert({'count': apiCount});
- var headers = {'Content-Type': 'application/json'};
- return Response.ok(json, headers: headers);
- }
-
- return Response.notFound('');
- };
-
- //
- // Cascade sends requests to `apiHandler` first. If that handler returns a
- // 404, the request is next sent to the proxy handler pointing at pub
- //
- var cascade = Cascade()
- .add(apiHandler)
- .add(proxyHandler(Uri.parse('http://localhost:$_pubPort')));
-
- //
- // Creates a pipeline handler which first logs requests and then sends them
- // to the cascade.
- //
- var handler =
- const Pipeline().addMiddleware(logRequests()).addHandler(cascade.handler);
-
- //
- // Serve the combined handler on localhost at port 8080.
- //
- io.serve(handler, 'localhost', 8080).then((server) {
- print('Serving at http://${server.address.host}:${server.port}');
- print('`pub serve` should be running at port $_pubPort '
- 'on the example dir.');
- print(' command: pub serve --port $_pubPort example/');
- });
-}
diff --git a/example/index.dart b/example/index.dart
deleted file mode 100644
index 5d708be..0000000
--- a/example/index.dart
+++ /dev/null
@@ -1,13 +0,0 @@
-import 'dart:convert';
-import 'dart:html';
-
-void main() {
- var span = querySelector('#count') as SpanElement;
-
- HttpRequest.getString('/api').then((value) {
- return json.decode(value);
- }).then((obj) {
- var count = obj['count'];
- span.text = count.toString();
- });
-}
diff --git a/example/index.html b/example/index.html
deleted file mode 100644
index 690b362..0000000
--- a/example/index.html
+++ /dev/null
@@ -1,16 +0,0 @@
-<!DOCTYPE html>
-
-<html>
- <head>
- <meta charset="utf-8">
- <meta name="viewport" content="width=device-width, initial-scale=1.0">
- <title>shelf_proxy example</title>
- </head>
-
- <body>
- <p id="text">API access count: <span id='count'>??</span></p>
- <script type="application/dart" src="index.dart"></script>
- <!-- for this next line to work, your pubspec.yaml file must have a dependency on 'browser' -->
- <script src="packages/browser/dart.js"></script>
- </body>
-</html>