2017 © Pedro Peláez
 

library lux

Modern lightweight PHP microservice framework.

image

lux/lux

Modern lightweight PHP microservice framework.

  • Monday, December 21, 2015
  • by larsvonqualen
  • Repository
  • 1 Watchers
  • 1 Stars
  • 7 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 0 Forks
  • 2 Open issues
  • 10 Versions
  • 0 % Grown

The README.md

lux

Modern lightweight PHP microservice framework., (*1)

Goals

  • Stay up-to-date with PHP, thus targeting the latest stable build of PHP, as of writing 7.
  • Stay simple.
  • Stay lightweight, thus not getting caught up in feature creep.
  • Stay fun!

Future goals

  • Get some documentation going!

Features

  • Simple handling of GET, POST, PATCH, DELETE and PUT requests.
  • Simple and easy to implement middleware, enabling easy modularization.

Simple example

<?php
require("../vendor/autoload.php");

use Lux\Handler;
use Lux\LuxApplication;
use Lux\Request;
use Lux\Response;

$handler = new Handler();

$handler->register("get", "/", function (Request $req, Response $res) {
    return $res->html("

Hello world!

"); }); $handler->register("get", "/{yourName}", function (Request $req, Response $res) { return $res->json([ "hello" => $req->getParam("yourName") ]); }); $handler->register("get", "/{firstName}/{lastName}", function (Request $req, Response $res) { return $res->json($req->getParams()); }); $handler->register("put", "/{id}", function (Request $req, Response $res) { return $res->json([ "id" => $req->getParam("id"), "req_body" => $req->getParam("body") ]); }); $handler->register("delete", "/{id}", function (Request $req, Response $res) { $res->status(204); }); $handler->register("post", "/", function (Request $req, Response $res) { return $res->json($req->getParam("body")); }); $handler->register("get", "/test", function (Request $req, Response $res) { return $res->json("sup"); }); LuxApplication::attachHandler($handler);

The Versions

21/12 2015

dev-master

9999999-dev https://github.com/LarsVonQualen/lux

Modern lightweight PHP microservice framework.

  Sources   Download

MIT

The Requires

 

by Lars von Qualen

microservice web api

21/12 2015

0.0.9-alpha

0.0.9.0-alpha https://github.com/LarsVonQualen/lux

Modern lightweight PHP microservice framework.

  Sources   Download

MIT

The Requires

 

by Lars von Qualen

microservice web api

20/12 2015

0.0.8-alpha

0.0.8.0-alpha https://github.com/LarsVonQualen/lux

Modern lightweight PHP microservice framework.

  Sources   Download

MIT

The Requires

 

by Lars von Qualen

microservice web api

20/12 2015

0.0.7-alpha

0.0.7.0-alpha https://github.com/LarsVonQualen/lux

Modern lightweight PHP microservice framework.

  Sources   Download

MIT

The Requires

 

by Lars von Qualen

microservice web api

20/12 2015

0.0.6-alpha

0.0.6.0-alpha https://github.com/LarsVonQualen/lux

Modern lightweight PHP microservice framework.

  Sources   Download

MIT

The Requires

 

by Lars von Qualen

microservice web api

20/12 2015

0.0.5-alpha

0.0.5.0-alpha https://github.com/LarsVonQualen/lux

Modern lightweight PHP microservice framework.

  Sources   Download

MIT

The Requires

 

by Lars von Qualen

microservice web api

20/12 2015

0.0.4-alpha

0.0.4.0-alpha https://github.com/LarsVonQualen/lux

Modern lightweight PHP microservice framework.

  Sources   Download

MIT

The Requires

 

by Lars von Qualen

microservice web api

20/12 2015

0.0.3-alpha

0.0.3.0-alpha https://github.com/LarsVonQualen/lux

Modern lightweight PHP microservice framework.

  Sources   Download

MIT

The Requires

 

by Lars von Qualen

microservice web api

20/12 2015

v0.0.1-alpha

0.0.1.0-alpha https://github.com/LarsVonQualen/lux

Modern lightweight PHP microservice framework.

  Sources   Download

MIT

The Requires

 

by Lars von Qualen

microservice web api

20/12 2015

0.0.2-alpha

0.0.2.0-alpha https://github.com/LarsVonQualen/lux

Modern lightweight PHP microservice framework.

  Sources   Download

MIT

The Requires

 

by Lars von Qualen

microservice web api