mirror of
https://github.com/zigzap/zap.git
synced 2025-10-20 15:14:08 +00:00
Minor README & comment cosmetics
This commit is contained in:
parent
44ac2f2c3a
commit
a01c6146ec
3 changed files with 4 additions and 11 deletions
|
@ -220,7 +220,7 @@ really promising.
|
|||
- [jetzig](https://github.com/jetzig-framework/jetzig) : Comfortably develop
|
||||
modern web applications quickly, using http.zig under the hood
|
||||
- [zzz](https://github.com/tardy-org/zzz) : Super promising, super-fast,
|
||||
especially for IO-heavy tasks, io_uring support - need I say more?
|
||||
especially for IO-heavy tasks, io_uring support - need I say more?
|
||||
|
||||
|
||||
## 💪 Robust
|
||||
|
|
|
@ -1,7 +1,8 @@
|
|||
const std = @import("std");
|
||||
const zap = @import("zap");
|
||||
|
||||
/// A simple endpoint listening on the /error route that causes an error on GET requests, which gets logged to the response (=browser) by default
|
||||
/// A simple endpoint listening on the /error route that causes an error on GET
|
||||
/// requests, which gets logged to the response (=browser) by default
|
||||
pub const ErrorEndpoint = @This();
|
||||
|
||||
path: []const u8 = "/error",
|
||||
|
@ -11,9 +12,8 @@ pub fn get(_: *ErrorEndpoint, _: zap.Request) !void {
|
|||
return error.@"Oh-no!";
|
||||
}
|
||||
|
||||
// unused:
|
||||
pub fn post(_: *ErrorEndpoint, _: zap.Request) !void {}
|
||||
// pub fn post(_: *ErrorEndpoint, _: zap.Request) !void {}
|
||||
|
||||
pub fn put(_: *ErrorEndpoint, _: zap.Request) !void {}
|
||||
pub fn delete(_: *ErrorEndpoint, _: zap.Request) !void {}
|
||||
pub fn patch(_: *ErrorEndpoint, _: zap.Request) !void {}
|
||||
|
|
|
@ -1,10 +1,3 @@
|
|||
//! WIP: zap.App.
|
||||
//!
|
||||
//! - Per Request Arena(s) thread-local?
|
||||
//! - Custom "State" Context, type-safe
|
||||
//! - route handlers
|
||||
//! - automatic error catching & logging, optional report to HTML
|
||||
|
||||
const std = @import("std");
|
||||
const Allocator = std.mem.Allocator;
|
||||
const ArenaAllocator = std.heap.ArenaAllocator;
|
||||
|
|
Loading…
Add table
Reference in a new issue