userctx: inject user context

This commit is contained in:
Pierre Tachoire
2024-04-16 12:06:29 +02:00
parent c1b73dfdc2
commit e18d04a799
10 changed files with 31 additions and 4 deletions

View File

@@ -25,6 +25,7 @@ const apiweb = @import("apiweb.zig");
const Window = @import("html/window.zig").Window;
pub const Types = jsruntime.reflect(apiweb.Interfaces);
pub const UserContext = apiweb.UserContext;
const socket_path = "/tmp/browsercore-server.sock";
@@ -103,5 +104,5 @@ pub fn main() !void {
try server.listen(addr);
std.debug.print("Listening on: {s}...\n", .{socket_path});
try jsruntime.loadEnv(&arena, execJS);
try jsruntime.loadEnv(&arena, null, execJS);
}