Skip to content

sadick254/resty

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

CircleCI

Resty

A fast, minimal with zero dependancies php router that enables you write straight forward rest api's

Installation

Use Composer to install Resty

composer require sadick/resty

Usage

<?php

require 'vendor/autoload.php'
use Resty\Router;

$app = new Router();
$app->get('/users', function ($req, $res) {
  $res->send("hello world");
});

$app->serve();

You can test that your requests are being served using the built in php server

php -S localhost:4000

Navigating to http://localhost:4000/users will display hello world