Coder Social home page Coder Social logo

server's Introduction

Resource Server API

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.

Installation

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

Web Server Setup

Apache Setup

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>

Database Setup

Database config:

server expects and assumes you have a valid database configuration under a top key named db.

Database tables:

Database tables are shipped with this repo in the data folder. Otherwise, you may get the sql file from here.

Upload Directory

Make sure this public/uploads directory is writable.

What More Needs to Be Done

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.

Modification for client repo:

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

License

server is provided under the MIT license.

Contributing

If you found a mistake or a bug, please report it using the Issues page. Your feedback is highly appreciated.

server's People

Contributors

unclexo avatar

Stargazers

 avatar  avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.