mirror of
https://github.com/vlang/v.git
synced 2023-08-10 21:13:21 +03:00
vweb: update references to old .init_once() and .init() methods to .init_server() and .before_request()
This commit is contained in:
@ -16,7 +16,7 @@ fn main() {
|
||||
vweb.run<App>(port)
|
||||
}
|
||||
|
||||
pub fn (mut app App) init_once() {
|
||||
pub fn (mut app App) init_server() {
|
||||
// Arbitary mime type.
|
||||
app.serve_static('/favicon.ico', 'favicon.ico', 'img/x-icon')
|
||||
// Automatically make available known static mime types found in given directory.
|
||||
@ -26,9 +26,6 @@ pub fn (mut app App) init_once() {
|
||||
app.handle_static('.', false)
|
||||
}
|
||||
|
||||
pub fn (mut app App) init() {
|
||||
}
|
||||
|
||||
pub fn (mut app App) index() vweb.Result {
|
||||
// We can dynamically specify which assets are to be used in template.
|
||||
// mut am := assets.new_manager()
|
||||
|
Reference in New Issue
Block a user