Index routes work. :)
This commit is contained in:
parent
93a29c43cf
commit
0de6c5234f
2 changed files with 4 additions and 3 deletions
|
@ -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);
|
||||||
|
|
||||||
|
|
|
@ -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
|
||||||
|
|
Loading…
Reference in a new issue