SakiKawasaki 5 anos atrás
pai
commit
a0e55d76bb
3 arquivos alterados com 7 adições e 3 exclusões
  1. 4 1
      README.md
  2. 2 1
      akane/akane.nim
  3. 1 1
      tests/test1/main.nim

+ 4 - 1
README.md

@@ -26,7 +26,7 @@
       var server = newServer(debug=true)  # launch on http://localhost:5000
 
       server.pages:
-        equal("/"):  # when url is "http://...localhost:5000/"
+        equals("/"):  # when url is "http://...localhost:5000/"
           # type of `request` is a Request.
           await request.answer("Hello, world!")  # utf-8 encoded message.
 
@@ -36,6 +36,9 @@
 
 
 # FAQ
+*Q*: Where I can learn this?  
+*A*: You can see [wiki page](https://github.com/Ethosa/akane/wiki/Getting-started)
+
 *Q*: How I can help to develop this project?  
 *A*: You can put a :star: :3
 

+ 2 - 1
akane/akane.nim

@@ -30,7 +30,7 @@ type
     server*: AsyncHttpServer
 
 
-var AKANE_DEBUG_MODE*: bool = false
+var AKANE_DEBUG_MODE*: bool = false  ## change it with `newServer proc<#newServer,string,uint16,bool>`_
 
 
 proc newServer*(address: string = "127.0.0.1",
@@ -55,6 +55,7 @@ proc loadtemplate*(name: string, json: JsonNode = %*{}): Future[string] {.async,
   ##
   ## Arguments:
   ## -   ``name`` - template's name, e.g. "index", "api", etc.
+  ## -   ``json`` - Json data, which replaces in the template.
   var
     file = openAsync(("templates" / name) & ".html")
     readed = await file.readAll()

+ 1 - 1
tests/test1/main.nim

@@ -2,7 +2,7 @@
 # Hello world prorgam.
 import akane
 
-var server = newServer("127.0.0.1", 5000, debug=true)  # default params
+let server = newServer("127.0.0.1", 5000, debug=true)  # default params
 
 
 server.pages: