Giter Club home page Giter Club logo

ge-test's Introduction

Test Project

Readme by Michael Andrew ([email protected])

Requirements

  • PHP 5.6.x & PHP-CLI 5.6.x
  • composer
  • MySQL 5.5.x

Installation

  1. Run composer install to install all project dependencies.

  2. Create a local MySQL database and import the DB_SCHEMA.sql into it.

  3. Copy the contents of config.dist.php to config.local.php and set the configuration to suit your environment.

Running Development Server

PHP Development Server

  1. Run php -S localhost:8000 to start the server. Make sure php set in your PATH points to your PHP 5.6.x binary.

  2. Navigate your browser to http://localhost:8000/ to access the web application.

Apache

  1. Set up a vhost in apache (e.g. vhost.local and point it to the public folder for the site root.

  2. Navigate your browser to http://vhost.local/ to access the web application.

Logging Out

  • No logout button has been implemented so you will need to manually clear all cookies for the application then log in again as another user.

API

List Users

curl http://localhost:8000/api/users/list

Returns

HTTP/1.1 200 OK
Host: localhost:8000
Connection: close
X-Powered-By: PHP/5.6.21-1~dotdeb+7.1
Content-Type: application/json
[
    {"id":"1","name":"Admin User","group_id":"1","email":"[email protected]","active":"1","created":"2016-05-23 19:06:25","updated":"0000-00-00 00:00:00","facebook_id":null,"twitter_id":null},
    {"id":"5","name":"Second User","group_id":"1","email":"[email protected]","active":"1","created":"2016-05-23 19:21:47","updated":"0000-00-00 00:00:00","facebook_id":"FACEBOOK_ID","twitter_id":null},
    {"id":"3","name":"Normal User","group_id":"1","email":"[email protected]","active":"1","created":"2016-05-23 19:15:25","updated":"0000-00-00 00:00:00","facebook_id":null,"twitter_id":null}
]

Where FACEBOOK_ID is the ID of the Facebook account linked to the user.

Login

curl -F email=EMAIL_ADDRESS -F password=PASSWORD http://localhost:8000/api/login

Where EMAIL_ADDRESS and PASSWORD are the credentials of the user to login as.

Returns

{"message":"Success!","success":true,"token":"TOKEN"}

Where TOKEN is an access token valid for future requests.

ge-test's People

Contributors

uxvirtual avatar

Stargazers

 avatar

Watchers

 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.