We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 5a5127c commit 72c0783Copy full SHA for 72c0783
src/main.zig
@@ -28,8 +28,11 @@ pub fn main() !void {
28
const server = try ct.injector.get(*tk.Server);
29
const port = server.http.config.port.?;
30
31
- const thread = try std.Thread.spawn(.{}, tk.Server.start, .{server});
32
- defer thread.join();
+ const thread = try server.http.listenInNewThread();
+ defer {
33
+ server.stop();
34
+ thread.join();
35
+ }
36
37
if (comptime options.headless) {
38
const banner =
@@ -64,11 +67,8 @@ pub fn main() !void {
64
67
const url = try std.fmt.allocPrintZ(gpa.allocator(), "http://127.0.0.1:{}", .{port});
65
68
defer gpa.allocator().free(url);
66
69
- // TODO: wait
70
_ = c.webview_navigate(w, url);
71
_ = c.webview_run(w);
-
- server.stop();
72
}
73
74
0 commit comments