2017 © Pedro Peláez
 

library silex-server

Easily create web servers for your Silex web application.

image

gabrieljmj/silex-server

Easily create web servers for your Silex web application.

  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 0 Forks
  • 0 Open issues
  • 6 Versions
  • 0 % Grown

The README.md

SilexServer

Build Status License Total Downloads Scrutinizer Code Quality, (*1)

Easily create web servers for your Silex web application., (*2)

Installation

Via Composer:, (*3)

composer require gabrieljmj/silex-server

Usage

Create your Silex application normaly:, (*4)

# index.php
<?php

require_once 'vendor/autoload.php';

$app = new Gabrieljmj\SilexServer\Application();

$app->get('/hello/{name}', function ($name) use ($app) {
  return 'Hello '.$app->escape($name);
});

$app->run();

return $app; // This MUST be in the file

And now create the bin that will create the server:, (*5)

#!/usr/bin/env php
<?php
$app = require_once 'index.php';

$host = 'localhost';
$port = 3000;

$app->createServer($host, $port, function () use ($port) {
    echo "Running on port {$port}\n";
})->run();

Build the server:, (*6)

your-bin

Now you can access http://localhost:3000., (*7)

The Versions

14/06 2015

dev-master

9999999-dev

Easily create web servers for your Silex web application.

  Sources   Download

MIT

The Requires

 

The Development Requires

14/06 2015

v1.0.4

1.0.4.0

Easily create web servers for your Silex web application.

  Sources   Download

MIT

The Requires

 

The Development Requires

14/06 2015

v1.0.3

1.0.3.0

Easily create web servers for your Silex web application.

  Sources   Download

MIT

The Requires

 

The Development Requires

14/06 2015

v1.0.2

1.0.2.0

Easily create web servers for your Silex web application.

  Sources   Download

MIT

The Requires

 

The Development Requires

14/06 2015

v1.0.1

1.0.1.0

Easily create web servers for your Silex web application.

  Sources   Download

MIT

The Requires

 

The Development Requires

14/06 2015

v1

1.0.0.0

  Sources   Download

The Requires

 

The Development Requires