Repository

VWebX

V Version License Documentation GitHub Stars GitHub Forks GitHub Issues

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

Features

  • 🚀 High Performance : Built on V's fast HTTP server
  • 🔌 Middleware Support : Easy to extend with custom middleware
  • 📦 JSON Processing : Built-in JSON encoding/decoding
  • 🎨 Template Engine : Simple and powerful templating
  • 💾 Database Integration : SQLite support out of the box
  • 🔒 Security : Built-in security features
  • 📝 Validation : Request validation and sanitization
  • ⚙️ Configuration : Flexible configuration system
  • 🛠 Developer Experience : Clean API and helpful error messages

Quick Start

Installation

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

For detailed documentation, visit https://lowleery.github.io/vwebx

API Reference

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('<h1>Hi</h1>') // HTML response
ctx.file('file.txt')   // File response

Examples

Check out the examples directory for more usage examples:

Contributing

We welcome contributions! Please see our Contributing Guide for details.

  1. Fork the repository
  2. Create your feature branch ( git checkout -b feature/amazing-feature )
  3. Commit your changes ( git commit -m 'Add amazing feature' )
  4. Push to the branch ( git push origin feature/amazing-feature )
  5. Open a Pull Request

Roadmap

  • Authentication & Authorization
  • WebSocket Support
  • PostgreSQL Support
  • Redis Integration
  • GraphQL Support
  • OpenAPI/Swagger Integration
  • Testing Framework
  • CLI Tool

Community

License

VWebX is licensed under the MIT License - see the LICENSE file for details.

Acknowledgments


Made with ❤️ by the VWebX Contributors

About

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

0
18
last Jun 10

Author

LowLeery