PHPackages                             phonetworks/pho-server-rest - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [HTTP &amp; Networking](/categories/http)
4. /
5. phonetworks/pho-server-rest

ActiveLibrary[HTTP &amp; Networking](/categories/http)

phonetworks/pho-server-rest
===========================

A REST based management API for the Pho Kernel.

4.1.2(6y ago)35.4k1[4 issues](https://github.com/phonetworks/pho-server-rest/issues)1MITPHPPHP &gt;=7.2.0CI failing

Since Aug 28Pushed 6y ago2 watchersCompare

[ Source](https://github.com/phonetworks/pho-server-rest)[ Packagist](https://packagist.org/packages/phonetworks/pho-server-rest)[ Docs](https://phonetworks.org)[ Fund](https://opencollective.com/risg)[ RSS](/packages/phonetworks-pho-server-rest/feed)WikiDiscussions master Synced yesterday

READMEChangelog (6)Dependencies (10)Versions (30)Used By (1)

 [![](https://github.com/phonetworks/commons-php/raw/master/.github/cover-smaller.png)](https://github.com/phonetworks/commons-php/raw/master/.github/cover-smaller.png)

pho-server-rest
===============

[](#pho-server-rest)

An event-driven non-blocking REST API for the Phở Kernel.

Pho-Server-Rest does not rely on a third party HTTP Server such as [NGINX](https://nginx.org/en/) or [Apache HTTPD](https://httpd.apache.org/). But it is recommended that you run it behind a proxy server for static assets and caching.

Requirements
------------

[](#requirements)

- [PHP 7.2+](https://www.php.net)
- [Composer](https://getcomposer.org/)
- [Git](https://git-scm.com/)

Installation
------------

[](#installation)

The recommended way to install pho-server-rest is through git. MacOS and most UNIX operating system come with git equipped.

`git clone https://github.com/phonetworks/pho-server-rest/`

> If you are on Windows or don't have git preinstalled, you may download and install git from , or just download the pho-server-rest zip tarball from and extract.

Once the REST Server is installed, you need a Phở Kernel to run it. You can install the standard Phở Kernel simply by typing:

```
git submodule init
git submodule update
```

Alternatively you may create your own kernel with a [custom recipe](https://github.com/pho-recipes), and copy/paste it under the kernel directory. For instructions on how to create a custom kernel, check out the [README.md](https://github.com/phonetworks/pho-kernel/blob/master/README.md) file of [pho-kernel](https://github.com/phonetworks/pho-kernel/).

Once the kernel is set up, you should install the dependencies using Composer as follows:

`composer install`

Do not forget to install such dependencies for the submodule kernel as well. You would need to copy the composer.json from one of the [presets](https://github.com/phonetworks/pho-kernel/tree/master/presets) which determine the structure of the graph you are to build.

```
cd kernel
cp presets/basic ./composer.json # any preset is fine
composer install
cd ..
```

To run the server, you must execute the [run.php](https://github.com/phonetworks/pho-server-rest/tree/master/run.php) file. Alternatively, you may call the server programmatically:

```
