mirror of
https://github.com/vlang/v.git
synced 2023-08-10 21:13:21 +03:00
examples: show how to use a before_request method for the multi-route examples, be more informative about DB creation problems (#16279)
This commit is contained in:
@@ -18,6 +18,10 @@ mut:
|
||||
cnt int
|
||||
}
|
||||
|
||||
pub fn (app App) before_request() {
|
||||
println('[Vweb] $app.Context.req.method $app.Context.req.url')
|
||||
}
|
||||
|
||||
fn main() {
|
||||
println('vweb example')
|
||||
vweb.run(&App{}, port)
|
||||
|
Reference in New Issue
Block a user