Share the HTTP client globally

This commit is contained in:
Karl Seguin
2025-03-19 10:53:26 +08:00
parent 9fe10747ce
commit ba8a0179d5
8 changed files with 82 additions and 60 deletions

View File

@@ -75,7 +75,7 @@ pub fn main() !void {
app.telemetry.record(.{ .run = {} });
const timeout = std.time.ns_per_s * @as(u64, opts.timeout);
server.run(&app, address, timeout) catch |err| {
server.run(app, address, timeout) catch |err| {
log.err("Server error", .{});
return err;
};
@@ -92,7 +92,7 @@ pub fn main() !void {
defer vm.deinit();
// browser
var browser = Browser.init(&app);
var browser = Browser.init(app);
defer browser.deinit();
var session = try browser.newSession({});