1
0
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:
Louis Schmieder
2021-02-21 19:01:29 +01:00
committed by GitHub
parent 0ccd9f9c6e
commit 7a35131721
4 changed files with 33 additions and 8 deletions

View File

@@ -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 {

View File

@@ -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() {

View File

@@ -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 {