Try add the following code:
template routes(body: untyped): untyped {.dirty.}=
block routes:
body
Run
Yeah it was a stupid question. Now that I think about it its more of a IDE
feature not a tester feature. Sorry for wasting your time.
This code works as expected. But I wanted to replace the "block routes:" with
"routes:" only. Any idea how to do this?
import asynchttpserver, asyncdispatch
template via*(rule_path: string, reqMethods: seq[string], code_to_execute:
untyped): untyped =
if $req.reqMetho
I wrote this nim program to elevate other programs to daemon status (and
restart them if they crash):
[https://github.com/treeform/guardmons/blob/master/daemon.nim](https://github.com/treeform/guardmons/blob/master/daemon.nim)
Wow, great-write up!
> How do we know that harmful must not compile but that harmless should compile?
If the compiler would keep tabs of which scope a symbol was bound in, it could
pass this "birth scope" info on through returns and potential assignments like
the one in `select`. Wouldn't write tracking detect these
handle with
[setControlCHook](https://nim-lang.org/docs/system.html#setControlCHook%2Cproc%29)
proc
Thank you all for the suggestions. Just one more question: How do I catch a
"KILL" or "HUP" or user abort signal (CTRL-C)?
There are different init system and tools to run an application as a daemon
without having to increase your application's complexity. Currently a lot of
distributions ship systemd by default as it provides features like automated
health check and restart and security sandboxing.
I wrote a littl
I usually make the executable as service using [this
reference](https://gist.github.com/bcap/5397674)
10 matches
Mail list logo