mirror of
https://github.com/vlang/v.git
synced 2023-08-10 21:13:21 +03:00
vweb: add a placeholder for checking route validity at startup
This commit is contained in:
parent
d34c5b767b
commit
b14f779853
@ -199,6 +199,11 @@ pub fn run_app<T>(mut app T, port int) {
|
||||
l := net.listen(port) or { panic('failed to listen') }
|
||||
app.vweb = Context{}
|
||||
app.init_once()
|
||||
$for method in T.methods {
|
||||
$if method.return_type is Result {
|
||||
// check routes for validity
|
||||
}
|
||||
}
|
||||
//app.reset()
|
||||
for {
|
||||
conn := l.accept() or { panic('accept() failed') }
|
||||
|
Loading…
Reference in New Issue
Block a user