How to await ajaxget (or any ajax methods). I have this code:
import sugar, json, karax / [kajax, kdom], asyncjs
proc onGetObj(status: int, resp: kstring) =
let retVal = parseJson($resp)
echo retVal
proc getObj(sd: string) {.async} =
await aja
Great tutorial series. Thank you for this.
Are the code shown in the video somewhere in github?
` Verifying dependencies for nimforum@2.0.2 Reading official package list
Checking for jester@#d8a03aa Info: Dependency on jester@#d8a03aa already
satisfied Verifying dependencies for jester@#d8a03aa Reading official package
list Checking for httpbeast@>= 0.2.2 Info: Dependency on httpbeast@>= 0
Tried both (verbose & individual command). Same error: No binaries built, did
you specify a valid binary name?
I used the latest code from github. Issued
git submodule update --init --recursive
nimble frontend
Run
I get this error: Error: No binaries built, did you specify a valid binary
name?.
Nim version: Nim Compiler Version 1.0.6 [MacOSX: amd64]
How to go further?
while this works if I have only one object, it doesn't serve the purpose if I
have multiple objects in different files - says sites in sites.nim, entries in
entries.nim and so on. If I have these global ajaxGet in each of these files,
they are all called at the start of the program which is unde
I'm using karax to write a SPA. I'm using routes as mentioned in the readme.
There is a signin form which gets a token from the backend api. Then the app
has to display list of sites for that token
proc createDom(data: RouterData): VNode =
let uri = $data.hashPart
#
😈 🤦♂️ Nice one.
All of NIM will be rewritten in Python or only machine learning part? Isn't
rewriting all of the language into another language waste of time rather than
spending it on improving either the language or the ecosystem?
@juancarlospaco: I am not looking for css themes. I use tachyons and am happy
with it. I want to know how to use these within Karax during development.
Thanks @Araq.
1. I see that this forum uses Spectre.css. But there is no mention of this
css in the codebase itself. How did you (or whoever is the author) did it? I
see a mock folder. Is it that you mocked the htmls, generated css and linked it
back to the generated html?
2. If the process
I'm starting with Karax apps. Gone through some of the introductory examples.
How do you style these especially with things like Bootstrap or other CSS
frameworks?
I am writing an api sever in Nim. The output is of the form:
{
code:"tk.01",
message: "Token in data field",
data:"12345"
}
Run
data field could be a string, single object (say a blog post), or an array
(sequence) of object
I'm using Jester to create a web-application. It connects to sqlite using
db_sqlite. For debugging purposes is it possible to see sqls executed during
development?
If I have all code in a single file:
import jester, json
routes:
get "/":
var jsonResp = $(%*{"id": 2})
resp Http200, jsonResp
Run
This works well without any problem.
Now if I split this into two files:
main.nim
import jes
As a security measure it is advisable to hide the server name.
I don't know who to set it up by hand. I searched through Jester's settings
document (and code) but couldn't find one that sets the server name. As an
example, Beego (the framework I have used in Go) allows setting the servername
us
I'm using Jester to write a REST server. Is it possible to change the server
name from httpbeast?
17 matches
Mail list logo