项目作者: prawee

项目描述 :
Create RESTful for deploy on Google App Engine with Yii2
高级语言: PHP
项目地址: git://github.com/prawee/yii2-gae-api.git
创建时间: 2017-10-19T19:59:15Z
项目社区:https://github.com/prawee/yii2-gae-api

开源协议:

下载


Yii2 API with Google App Engine

Create RESTFul for deploy on Google App Engine (Standard Environment) with Yii2

Support

  1. response both xml and json format
  2. make versioning
  3. using .env file between server and local
  4. using memcache via app-engine

Installation

  1. git clone https://github.com/prawee/yii2-gae-api
  2. cd yii2-gae-api
  3. composer install

Configuration

Update environment variable for your local

  1. cp .env.dist .env

Update environment variable for your GAE

  1. cp app.yaml.dist app.yaml
  2. cp cron.yaml.dist cron.yaml

Update configure on your local

  1. cp config/main-local.php.dist config/main-local.php

Running

localhost

  1. php -S localhost:8080 -t public

localhost with google app engine

  1. dev_appserver.py app.yaml

Look

  1. # local
  2. GET localhost:8080/requirements.php
  3. GET localhost:8080/site
  4. GET localhost:8080/v1/users
  1. # gae
  2. GET https://<project-id>.appspot.com/requirements.php
  3. GET https://<project-id>.appspot.com/site
  4. GET https://<project-id>.appspot.com/v1/users