File tree Expand file tree Collapse file tree 2 files changed +4
-10
lines changed
examples/vweb/vweb_assets Expand file tree Collapse file tree 2 files changed +4
-10
lines changed Original file line number Diff line number Diff line change 1
1
< html >
2
2
< header >
3
3
< title > @title</ title >
4
- @css 'examples/vweb/vweb_assets/assets/ index.css'
4
+ @css 'index.css'
5
5
</ header >
6
6
< body >
7
7
< h1 > @title</ h1 >
Original file line number Diff line number Diff line change @@ -13,17 +13,11 @@ struct App {
13
13
}
14
14
15
15
fn main () {
16
- vweb.run (& App{}, port)
17
- }
18
-
19
- pub fn (mut app App) init_server () {
20
- // Arbitary mime type.
16
+ mut app := & App{}
21
17
app.serve_static ('/favicon.ico' , 'favicon.ico' )
22
18
// Automatically make available known static mime types found in given directory.
23
- // app.handle_static('assets')
24
- // This would make available all known static mime types from current
25
- // directory and below.
26
- app.handle_static ('.' , false )
19
+ app.handle_static ('assets' , true )
20
+ vweb.run (app, port)
27
21
}
28
22
29
23
pub fn (mut app App) index () vweb.Result {
You can’t perform that action at this time.
0 commit comments