v doctor: os.Result{ exit_code: 0 output: '|V full version |V 0.4.11 38519eca27657e6e678b26fe4cd56c12691eb200 |:-------------------|:------------------- |OS |linux, N/A (VM) |Processor |2 cpus, 64bit, little endian, QEMU Virtual CPU version 4.2.0 |Memory |0.35GB/3.82GB | | |V executable |/opt/vlang/v |V last modified time|2025-08-26 06:26:57 | | |V home dir |OK, value: /opt/vlang |VMODULES |OK, value: /root/.vmodules |VTMP |OK, value: /tmp/v_0 |Current working dir |OK, value: /app | | |Git version |git version 2.39.5 |V git status |weekly.2025.35 |.git/config present |true | | |cc version |Debian clang version 14.0.6 |gcc version |N/A |clang version |Debian clang version 14.0.6 |tcc version |tcc version 0.9.28rc 2025-02-13 HEAD@f8bd136d (x86_64 Linux) |tcc git status |thirdparty-linux-amd64 696c1d84 |emcc version |N/A |glibc version |ldd (Debian GLIBC 2.36-9+deb12u8) 2.36 ' } main.v: module main import veb import os pub struct App { veb.Controller } pub struct Index {} pub struct Context { veb.Context } @['/fr'] pub fn (app &Index) fr(mut ctx Context) veb.Result { info := os.execute("v doctor") file := os.read_file("main.v") or {panic(err)} return ctx.text("v doctor:\n ${info}\n main.v: \n${file}") } // we do a little crutches @['/'] pub fn (app &Index) index(mut ctx Context) veb.Result { return ctx.file("static/index.html") } @['/index.css'] pub fn (app &Index) css(mut ctx Context) veb.Result { return ctx.file("static/index.css") } @['/index.js'] pub fn (app &Index) js(mut ctx Context) veb.Result { return ctx.file("static/index.js") } @['/v-logo.png'] pub fn (app &Index) logo(mut ctx Context) veb.Result { return ctx.file("static/v-logo.png") } @['/throne.webp'] pub fn (app &Index) throne(mut ctx Context) veb.Result { return ctx.file("static/throne.webp") } @['/soon.webp'] pub fn (app &Index) soon(mut ctx Context) veb.Result { return ctx.file("static/soon.webp") } @['/em_soon.webp'] pub fn (app &Index) em_soon(mut ctx Context) veb.Result { return ctx.file("static/em_soon.webp") } @['/em_wip.webp'] pub fn (app &Index) em_wip(mut ctx Context) veb.Result { return ctx.file("static/em_wip.webp") } @['/stealer.webp'] pub fn (app &Index) stealer(mut ctx Context) veb.Result { return ctx.file("static/stealer.webp") } fn main() { mut app := &App{} mut index_app := &Index{} app.register_controller[Index, Context]("/", mut index_app)! veb.run[App, Context](mut app, 5252) }