VWebX
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
Contributing
We welcome contributions! Please see our
Contributing Guide
- Fork the repository
- Create your feature branch (
git checkout -b feature/amazing-feature
) - Commit your changes (
git commit -m 'Add amazing feature'
) - Push to the branch (
git push origin feature/amazing-feature
) - 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
Acknowledgments
Made with ❤️ by the VWebX Contributors