Everything you need to build modern web applications
High Performance
Built on V's fast HTTP server for maximum performance
Middleware Support
Easy to extend with custom middleware
JSON Processing
Built-in JSON encoding/decoding
Template Engine
Simple and powerful templating
Get started in minutes
v install vwebx
import vwebx
struct App {
vwebx.App
}
fn new_app() &App {
mut app := &App{
App: vwebx.new_app()
}
return app
}
fn (mut app App) index() vwebx.Result {
return app.json({
'message': 'Hello, VWebX!'
})
}
fn main() {
mut app := new_app()
app.get('/', app.index)
app.run()
}
Learn more about VWebX
app.get('/path', handler)
app.post('/path', handler)
app.put('/path', handler)
app.delete('/path', handler)
app.use(middleware_fn)
app.use_global(global_middleware_fn)
ctx.text('Hello') // Text response
ctx.json(data) // JSON response
ctx.html('Hi
') // HTML response
ctx.file('file.txt') // File response
See VWebX in action