karlseguin / http.zig

An HTTP/1.1 server for zig
MIT License
455 stars 31 forks source link

Fix global.zig example #12

Closed CodesOtakuYT closed 1 year ago

karlseguin commented 1 year ago

Not sure I agree with this. global.zig's start is called from main.zig. If you make this change, than the running demo no longer works (e.g. running zig build run from the root of the repo). I added a comment to explain why it is the way it is.

CodesOtakuYT commented 1 year ago

Not sure I agree with this. global.zig's start is called from main.zig. If you make this change, than the running demo no longer works (e.g. running zig build run from the root of the repo). I added a comment to explain why it is the way it is.

Oh I see, it is unusual to do it that way, I usually would expect full independent examples or at the very least an actual helper file in the same directory being used to cut down on boilerplate.

CodesOtakuYT commented 1 year ago

But I think the comment you have added is also fine, thanks.