1
0
mirror of https://github.com/vlang/v.git synced 2023-08-10 21:13:21 +03:00

vweb: debug prints behind $if debug

This commit is contained in:
Alexander Medvednikov
2020-06-10 11:50:06 +02:00
parent 931bba1d7d
commit b904d7d1ba
2 changed files with 11 additions and 9 deletions

View File

@ -17,10 +17,13 @@ fn main() {
vweb.run<App>(port)
}
pub fn (mut app App) init() {
pub fn (mut app App) init_once() {
app.vweb.handle_static('.')
}
pub fn (mut app App) init() {
}
pub fn (mut app App) json_endpoint() {
app.vweb.json('{"a": 3}')
}
@ -34,9 +37,6 @@ pub fn (mut app App) index() {
$vweb.html()
}
pub fn (mut app App) reset() {
}
pub fn (mut app App) text() {
app.vweb.text('Hello world from vweb')
}