Initial project import
This commit is contained in:
commit
23f2d29e32
11957 files changed
+1754577
No files matched your search
@@ -0,0 +1,21 @@
|
||||
module main
|
||||
|
||||
import veb
|
||||
import os
|
||||
|
||||
pub struct Context {
|
||||
veb.Context
|
||||
}
|
||||
|
||||
pub struct App {
|
||||
veb.StaticHandler
|
||||
}
|
||||
|
||||
fn main() {
|
||||
// make sure that the working folder is the one, containing the executable,
|
||||
// so that 'dist' is a valid relative path from it later:
|
||||
os.chdir(os.dir(os.executable()))!
|
||||
mut app := &App{}
|
||||
app.handle_static('dist', true)!
|
||||
veb.run[App, Context](mut app, 8080)
|
||||
}
|
||||
Reference in new issue
Block a user