server is a RESTful application. This works as the Resource Server and the Authorization Server from the same API server. So this would be both your resource server and authorization server. server uses OAuth2 authentication framework to authenticate resource owner using password grant.
Caution: This is designed to work with this repo client which would be a Client of this API. To get a complete applicatoin this needs to be set up too.
Just clone the repository and run composer
as follows:
cd path/to/project/dir
git clone git://github.com/unclexo/server.git
cd server
php composer.phar install
Alternately, download the repo to some directory and run composer
as follows:
cd path/to/project/dir
php composer.phar install
To setup apache, setup a virtual host to point to the public/ directory of the project. It should look something like below:
<VirtualHost *:80>
ServerName server.dev
DocumentRoot /path/to/server/public
<Directory /path/to/server/public>
DirectoryIndex index.php
AllowOverride All
Require all granted
</Directory>
</VirtualHost>
server expects and assumes you have a valid database configuration under a top key named db
.
Database tables are shipped with this repo in the data
folder. Otherwise, you may get the sql file from here.
Make sure this public/uploads
directory is writable.
You must set up another repo to work with this API as a Client API named client. So please go over there and set up things as said there.
As you already know it works with this repo client
So this client repo expects server name as server.dev
.
If you do not set up the ServerName
to server.dev
while creating virtual host, you have to change your preferred server name only in two places in two files of this client repo. So please search for server.dev
in the following files and replace them with your own one:
client/module/Common/src/Common/Client/ApiClient.php
client/module/User/src/User/Entity/UserEntity.php
server is provided under the MIT license.
If you found a mistake or a bug, please report it using the Issues page. Your feedback is highly appreciated.