mirror of
https://github.com/vlang/v.git
synced 2023-08-10 21:13:21 +03:00
vweb: add handle static root & documentation (#8865)
This commit is contained in:
@@ -15,7 +15,7 @@ fn main() {
|
||||
|
||||
pub fn (mut app App) init_once() {
|
||||
app.serve_static('/favicon.ico', 'favicon.ico', 'img/x-icon')
|
||||
app.handle_static('.')
|
||||
app.handle_static('.', false)
|
||||
}
|
||||
|
||||
pub fn (mut app App) index() vweb.Result {
|
||||
|
@@ -23,7 +23,7 @@ pub fn (mut app App) init_once() {
|
||||
// app.handle_static('assets')
|
||||
// This would make available all known static mime types from current
|
||||
// directory and below.
|
||||
app.handle_static('.')
|
||||
app.handle_static('.', false)
|
||||
}
|
||||
|
||||
pub fn (mut app App) init() {
|
||||
|
@@ -18,7 +18,7 @@ fn main() {
|
||||
}
|
||||
|
||||
pub fn (mut app App) init_once() {
|
||||
app.handle_static('.')
|
||||
app.handle_static('.', false)
|
||||
}
|
||||
|
||||
pub fn (mut app App) json_endpoint() vweb.Result {
|
||||
|
Reference in New Issue
Block a user