Zag is a minimalistic web framework written in Zig, inspired by Ruby on Rails.
- Routing: Define URL mappings to controller actions.
- HTTP Server Integration: A built-in, basic HTTP server that listens for incoming connections and dispatches requests to appropriate handlers.
- Middleware Support: (Planned) Extend functionality using a middleware system.
- Templating: (Planned) Render dynamic HTML responses.
- Database Integration: (Planned) ORM-style model interactions.
- Scaffolding: (Planned) Code generation for models, controllers, and views.
- Install Zig
- Clone this repository:
git clone https://github.com/yourusername/zag_framework.git cd zag_framework - Build the project:
zig build
Start the server:
zig build runBy default, the server listens on 0.0.0.0:8080. Access it via your browser or a tool like curl.
try router.get("/", homeHandler);
try router.get("/about", aboutHandler);- Routing System
- HTTP Server Integration
- Middleware
- Model Layer (ActiveRecord-like)
- View Layer (HTML Templating)
- CLI (
zag new MyApp)
Feel free to open issues and contribute!