From 9df68bef196a45395ddc823b69077995bd31966b Mon Sep 17 00:00:00 2001 From: Brendan Hansen Date: Thu, 3 Nov 2022 22:51:15 -0500 Subject: [PATCH] tiny changes but bugfixes --- build.onyx | 1 - onyx-pkg.ini | 2 +- src/app.onyx | 11 +++++++++-- 3 files changed, 10 insertions(+), 4 deletions(-) diff --git a/build.onyx b/build.onyx index 75739eb..e56f8a2 100644 --- a/build.onyx +++ b/build.onyx @@ -5,5 +5,4 @@ #library_path "./bin" #load_all "./src" -// #load "./src/html-templates/module" diff --git a/onyx-pkg.ini b/onyx-pkg.ini index b34c390..8a3d1f0 100644 --- a/onyx-pkg.ini +++ b/onyx-pkg.ini @@ -17,7 +17,7 @@ build_cmd= library= [dependencies] -git://onyxlang.io/repo/http-server=0.0.17 +git://onyxlang.io/repo/http-server=0.0.18 git://onyxlang.io/repo/postgres-orm=0.0.18 git://onyxlang.io/repo/otmp=0.0.2 diff --git a/src/app.onyx b/src/app.onyx index 461cfe2..e430a71 100644 --- a/src/app.onyx +++ b/src/app.onyx @@ -29,6 +29,13 @@ reg: otmp.TemplateRegistry; test = req, }); + + res->status(200); +} + +@http.route.{.GET, "/slow"} +(req: ^Req, res: ^Res) { + res->html("

Hmmm...

"); res->status(200); } @@ -38,8 +45,8 @@ main :: () { app := http.application(); - files := http.static("/static/", "./www/static/"); - app->pipe(^files); + // files := http.static("/static/", "./www/static/"); + // app->pipe(^files); #if #defined(runtime.vars.Debug) { app->pipe((req, res) => { -- 2.25.1