Valum is a Web micro-framework entirely written in the Vala programming language.
using Valum;
using VSGI;
var app = new Router ();
app.use (basic ()); /* handle stuff like 404 errors and more */
app.get ("/", (req, res) => {
res.headers.set_content_type ("text/plain", null);
return res.expand_utf8 ("Hello world!");
});
Server.@new ("http", handler: app).run ({"app", "--address=0.0.0.0:3003", "--forks=4"});
We maintain Docker images already setup with Valum and the latest LTS version of Ubuntu.
docker pull valum/valum
If you use Meson, you can install Valum as a subproject using Bower:
bower install valum
For other installation procedures, head to the user documentation.
Valum has a two layer architecture: VSGI a middleware that abstract away various network protocols under a simple interface and Valum itself, a Web micro-framework that provide all the features needed for writing applications and services. In short it provides:
Method.GET | Method.POST
) for common HTTP methodsHEAD
and OPTIONS
throw new Redirection.PERMANENT ("http://example.com/");
fork
to scale on multi-core architectureValum is built by the community under the LGPL license, so anyone can use or contribute to the framework.
We use semantic versioning, so make sure that your changes
You can get help with Valum from different sources: