GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • View on GitHub

This view

  • Original page
  • New address

GeezerVison is showing unicframework.github.io — Unic Framework

Unic Framework

Unic Logo

Unic is a high performance, open source web application framework. Unic framework is fast, minimal and unopinionated web framework inspired by express. Unic is simple and flexible and provide lots of features to create apis and web application quickly.

Features

  • Fast and flexible.
  • Extremely light weight.
  • Minimal and unopinionated.
  • Simple and robust routing.
  • Robust middlewares.

User Guide

  • Installation
  • Routing
  • Middlewares
  • Response
  • Views
  • Static files
  • Session
  • Cookie
  • File Uploading

Simple Example

A simple Hello, World web application in unic framework.

use Unic\App;

$app = new App();

$app->get('/', function($req, $res) {
    $res->send('Hello, World!');
});

$app->get('/api', function($req, $res) {
    $res->json([
        'status' => 'Ok',
    ]);
});

$app->start();

OpenSwoole Example

A simple Hello, World web application in unic framework using OpenSwoole server.

use Unic\App;
use OpenSwoole\Http\Server;

$app = new App();
$server = new Server("127.0.0.1", 3000);

$app->get('/', function($req, $res) {
    $res->send('Hello, World!');
});

$app->get('/api', function($req, $res) {
    $res->json([
        'status' => 'Ok',
    ]);
});

$app->useOpenSwooleServer($server);
$app->start();

Run OpenSwoole app:

php server.php

It will start openswoole server at localhost

License

MIT License

You are visitor 01402503 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.