forked from tfcoop/www_duniayetu
update
This commit is contained in:
parent
4e60491968
commit
9445c7000d
8
run.vsh
8
run.vsh
@ -1,3 +1,5 @@
|
|||||||
|
#!/usr/bin/env -S v
|
||||||
|
|
||||||
import freeflowuniverse.webcomponents.preprocessor
|
import freeflowuniverse.webcomponents.preprocessor
|
||||||
import freeflowuniverse.webcomponents.tailwind
|
import freeflowuniverse.webcomponents.tailwind
|
||||||
import vweb
|
import vweb
|
||||||
@ -22,6 +24,10 @@ fn main() {
|
|||||||
vweb.run(&app, 8089)
|
vweb.run(&app, 8089)
|
||||||
}
|
}
|
||||||
|
|
||||||
pub fn (mut app App) index() vweb.Result {
|
['/:path...']
|
||||||
|
pub fn (mut app App) index(path string) vweb.Result {
|
||||||
|
if !path.ends_with('.html') {
|
||||||
|
return app.html(read_file('./public${path}/index.html') or {panic(err)})
|
||||||
|
}
|
||||||
return app.html(read_file('./public/index.html') or { panic(err) })
|
return app.html(read_file('./public/index.html') or { panic(err) })
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user