Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(13)

Side by Side Diff: third_party/pkg/route_hierarchical/README.md

Issue 180843004: Revert revision 33053 (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 6 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « third_party/pkg/js/pubspec.yaml ('k') | third_party/pkg/route_hierarchical/REVISION » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 Route 1 Route
2 ===== 2 =====
3 3
4 Route is a client + server routing library for Dart that helps make building 4 Route is a client + server routing library for Dart that helps make building
5 single-page web apps and using `HttpServer` easier. 5 single-page web apps and using `HttpServer` easier.
6 6
7 Installation 7 Installation
8 ------------ 8 ------------
9 9
10 Add this package to your pubspec.yaml file: 10 Add this package to your pubspec.yaml file:
(...skipping 139 matching lines...) Expand 10 before | Expand all | Expand 10 after
150 -------------- 150 --------------
151 151
152 On the server, route gives you a utility function to match `HttpRequest`s 152 On the server, route gives you a utility function to match `HttpRequest`s
153 against `UrlPatterns`. 153 against `UrlPatterns`.
154 154
155 ```dart 155 ```dart
156 import 'urls.dart'; 156 import 'urls.dart';
157 import 'package:route_hierarchical/server.dart'; 157 import 'package:route_hierarchical/server.dart';
158 import 'package:route_hierarchical/pattern.dart'; 158 import 'package:route_hierarchical/pattern.dart';
159 159
160 HttpServer.bind('0.0.0.0', 8888).then((server) { 160 HttpServer.bind().then((server) {
161 var router = new Router(server) 161 var router = new Router(server)
162 ..filter(matchesAny(allUrls), authFilter) 162 ..filter(matchesAny(allUrls), authFilter)
163 ..serve(homeUrl).listen(serverHome) 163 ..serve(homeUrl).listen(serverHome)
164 ..serve(articleUrl, method: 'GET').listen(serveArticle); 164 ..serve(articleUrl, method: 'GET').listen(serveArticle);
165 }); 165 });
166 166
167 Future<bool> authFilter(req) { 167 Future<bool> authFilter(req) {
168 return getUser(getUserIdCookie(req)).then((user) { 168 return getUser(getUserIdCookie(req)).then((user) {
169 if (user != null) { 169 if (user != null) {
170 return true; 170 return true;
(...skipping 13 matching lines...) Expand all
184 ------------- 184 -------------
185 185
186 * Integration with Web UI so that the changing of UI views can happen 186 * Integration with Web UI so that the changing of UI views can happen
187 automatically. 187 automatically.
188 * Handling different HTTP methods to help implement REST APIs. 188 * Handling different HTTP methods to help implement REST APIs.
189 * Automatic generation of REST URLs from a single URL pattern, similar to Ruby 189 * Automatic generation of REST URLs from a single URL pattern, similar to Ruby
190 on Rails 190 on Rails
191 * Helpers for nested views and key-value URL schemes common with complex apps. 191 * Helpers for nested views and key-value URL schemes common with complex apps.
192 * [Done] ~~Server-side routing for the dart:io v2 HttpServer~~ 192 * [Done] ~~Server-side routing for the dart:io v2 HttpServer~~
193 * [Done] ~~IE 9 support~~ 193 * [Done] ~~IE 9 support~~
OLDNEW
« no previous file with comments | « third_party/pkg/js/pubspec.yaml ('k') | third_party/pkg/route_hierarchical/REVISION » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698