Index routes work. :)

This commit is contained in:
regiostech 2016-04-28 20:12:57 -04:00
parent 93a29c43cf
commit 0de6c5234f
2 changed files with 4 additions and 3 deletions

View file

@ -41,8 +41,9 @@ class Angel extends Routable {
this.httpServer = server; this.httpServer = server;
server.listen((HttpRequest request) async { server.listen((HttpRequest request) async {
String req_url = String req_url = request.uri.toString().replaceAll(new RegExp(r'\/+$'), '');
request.uri.toString().replaceAll(new RegExp(r'\/+$'), ''); if (req_url.isEmpty)
req_url = '/';
RequestContext req = await RequestContext.from(request, {}, this, null); RequestContext req = await RequestContext.from(request, {}, this, null);
ResponseContext res = await ResponseContext.from(request.response, this); ResponseContext res = await ResponseContext.from(request.response, this);

View file

@ -1,5 +1,5 @@
name: angel_framework name: angel_framework
version: 0.0.0-dev.6 version: 0.0.0-dev.7
description: Core libraries for the Angel framework. description: Core libraries for the Angel framework.
author: Tobe O <thosakwe@gmail.com> author: Tobe O <thosakwe@gmail.com>
homepage: https://github.com/angel-dart/angel_framework homepage: https://github.com/angel-dart/angel_framework