Ver Fonte

small fix

SakiKawasaki há 5 anos atrás
pai
commit
3743a77963
1 ficheiros alterados com 4 adições e 3 exclusões
  1. 4 3
      akane/akane.nim

+ 4 - 3
akane/akane.nim

@@ -199,14 +199,15 @@ macro pages*(server: ServerRef, body: untyped): untyped =
   ## -   ``regex``
   ## -   ``notfound`` - this page uses without URL argument.
   runnableExamples:
-    # You can also not write `equals("/")`:
+    let server = newServer(debug=true)
     server.pages:
-      "/helloworld":
-        await request.answer("Hello, world")
       equals("/home"):
         echo url
         echo urlParams
         await request.answer("Home")
+      # You can also not write `equals("/")`:
+      "/helloworld":
+        await request.answer("Hello, world")
   var
     stmtlist = newStmtList()
     notfound_declaration = false