Valum is a Web micro-framework entirely written in the Vala programming language.
using Valum;
using VSGI;
var app = new Router ();
app.use (basic ());
app.get ("/", (req, res) => {
res.headers.set_content_type ("text/plain", null);
return res.extend_utf8 ("Hello world!");
});
Server.@new ("http", handler: app).run ({"app", "--forks=4"});
The installation process is fully documented in the user documentation.
- powerful routing mechanism to write expressive Web services:
- helpers and flags (i.e.
Method.GET | Method.POST
) for common HTTP methods - scoping
- rule system supporting typed parameters, group, optional and wildcard
- regular expression with capture extraction
- automatic
HEAD
andOPTIONS
- subrouting
- status codes through error domains (i.e.
throw new Redirection.PERMANENT ("http://example.com/");
- filtering by composition
- context to hold states
- helpers and flags (i.e.
- middlewares for subdomains, server-sent events, content negotiation and much more
- written upon VSGI, an abstraction layer for various protocols:
- fast, asynchronous and elegant
- streaming-first API
- listen on multiple interfaces (e.g. port, UNIX socket, file descriptor) with tight GIO integration
- support libsoup-2.4 built-in HTTP server, CGI, FastCGI and SCGI out of the box
- support plugin for custom server implementation
fork
to scale on multi-core architecture- cushion for parsing CLI, logging and running a Web application
- extensively documented at docs.valum-framework.org
Valum is built by the community under the LGPL license, so anyone can use or contribute to the framework.
- fork repository
- pick one task from TODO.md or GitHub issues
- let us know what you will do (or attempt!)
- code
- make a pull request of your amazing changes
- let everyone enjoy :)
We use semantic versionning, so make sure that your changes
- does not alter api in bugfix release
- does not break api in minor release
- breaks api in major (we like it that way!)
You can get help with Valum from different sources:
- mailing list: vala-list.
- IRC channel: #vala and #valum at irc.gimp.net
- Google+ page for Vala
- issues on GitHub with the
question
label