VWebX

A modern, fast, and flexible web framework for the V programming language

Features

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

Quick Start

Get started in minutes

v install vwebx

Basic Example

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()
}

Documentation

Learn more about VWebX

HTTP Methods

app.get('/path', handler)
app.post('/path', handler)
app.put('/path', handler)
app.delete('/path', handler)

Middleware

app.use(middleware_fn)
app.use_global(global_middleware_fn)

Response Helpers

ctx.text('Hello')      // Text response
ctx.json(data)         // JSON response
ctx.html('

Hi

') // HTML response ctx.file('file.txt') // File response

Examples

See VWebX in action

Hello World

Basic HTTP server with routing

View Example

Templates

HTML template usage with layouts

View Example