This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const std = @import("std"); | |
const net = std.net; | |
const Allocator = std.mem.Allocator; | |
pub const io_mode = .evented; | |
var client_id_counter: u32 = 0; | |
var should_server_close: bool = false; | |
pub fn main() !void { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
store Application { | |
property page : String = "" | |
property pages : Array(Ui.Pager.Item) = { | |
[ | |
{ | |
name = "home", | |
contents = <Home/>, | |
url = "/home", | |
icon = "fa-home", | |
arrangement = 10 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# <Araq> I don't know what to say, callbacks are not special. a Nim proc is mapped to a JS function, just pass it around | |
# <Araq> proc takesCallback(x: proc()) {.importc.} | |
# <Araq> takesCallback proc = | |
# <Araq> echo "my code here" | |
include karax / prelude | |
from future import `=>` | |
import karax / errors | |
type |