import x.vweb
import time

pub struct App {}

pub struct Context {
	vweb.Context
}

fn main() {
	spawn fn () {
		time.sleep(100 * time.millisecond)
		println('done')
		exit(0)
	}()
	time.sleep(10 * time.second)
	mut app := &App{}
	vweb.run_at[App, Context](mut app, port: 38090)!
}

@['/']
pub fn (app &App) index(mut ctx Context) vweb.Result {
	return ctx.text('Hello World')
}
