GithubHelp home page GithubHelp logo

geoffjay / valum Goto Github PK

View Code? Open in Web Editor NEW

This project forked from valum-framework/valum

0.0 2.0 0.0 3.33 MB

Web micro-framework written in Vala

Home Page: http://docs.valum-framework.org/en/latest/

License: GNU Lesser General Public License v3.0

Meson 2.08% Vala 97.91% HTML 0.01%

valum's Introduction

Valum Web micro-framework

Build Status Documentation Status codecov.io

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.extend_utf8 ("Hello world!");
});

Server.@new ("http", handler: app).run ({"app", "--address=0.0.0.0:3003", "--forks=4"});

Installation

Docker

We maintain Docker images already setup with Valum and the latest LTS version of Ubuntu.

docker pull valum/valum

Bower

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.

Features

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:

  • 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 and OPTIONS
    • subrouting
    • status codes through error domains (i.e. throw new Redirection.PERMANENT ("http://example.com/");
    • context to hold states
  • middlewares for subdomains, server-sent events, content negotiation and much more
  • 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
  • extensive documentation at docs.valum-framework.org

Contributing

Valum is built by the community under the LGPL license, so anyone can use or contribute to the framework.

  1. fork repository
  2. pick one task from TODO.md or GitHub issues
  3. let us know what you will do (or attempt!)
  4. code
  5. make a pull request of your amazing changes
  6. let everyone enjoy :)

We use semantic versioning, 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!)

Discussions and help

You can get help with Valum from different sources:

valum's People

Contributors

arteymix avatar antono avatar bob131 avatar corpsee avatar efrane avatar aguspiza avatar chebizarro avatar

Watchers

James Cloos avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.