This reverts commit
|
||
|---|---|---|
| .. | ||
| test | ||
| www | ||
| .gitattributes | ||
| .gitignore | ||
| build.zig | ||
| LICENSE | ||
| LICENSE-APACHE | ||
| LICENSE-MIT | ||
| mime.zig | ||
| README.md | ||
| wasmserve.zig | ||
mach/wasmserve
Small web server specifically for serving Zig WASM applications in development
Getting started
Adding dependency
In a libs subdirectory of the root of your project:
git clone https://github.com/machlibs/wasmserve
Then in your build.zig add:
...
const wasmserve = @import("libs/wasmserve/wasmserve.zig");
pub fn build(b: *Builder) void {
...
const serve_step = try wasmserve.serve(exe, .{ .watch_paths = &.{"src/main.zig"} });
const run_step = b.step("run", "Run development web server");
run_step.dependOn(&serve_step.step);
}
Join the community
Join the Mach community on Discord or Matrix to discuss this project, ask questions, get help, etc.