import veb
import time

pub struct App {}

pub struct Context {
	veb.Context
}

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

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