Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/prawee/silex-gae
Silex with Google App Engine
https://github.com/prawee/silex-gae
api php restful restful-webservices silex
Last synced: about 11 hours ago
JSON representation
Silex with Google App Engine
- Host: GitHub
- URL: https://github.com/prawee/silex-gae
- Owner: prawee
- Created: 2017-10-04T08:16:35.000Z (about 7 years ago)
- Default Branch: master
- Last Pushed: 2017-10-04T09:34:54.000Z (about 7 years ago)
- Last Synced: 2024-04-18T21:06:32.031Z (7 months ago)
- Topics: api, php, restful, restful-webservices, silex
- Language: PHP
- Homepage: http://www.prawee.com
- Size: 1.95 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Create project with Silex
### Create folder
```bash
$ cd /var/www
$ mkdir silex-gae
$ cd silex-gae
```### Create package.json
```bash
$ npm init
# package name: (silex-gae) **enter
# version: (1.0.0) **enter
# description: **Create project with Silex for deploy to GAE
# entry point: (index.js) **index.php
# test command: **enter
# git repository: **https://github.com/prawee/silex-gae.git
# keywords: **GAE,Silex,RESTFul, API
# author: **Prawee Wongsa
# license: (ISC) **MIT
# {.....}
# Is this ok? (yes) **yes
```### Installation Silex with Composer
```bash
$ composer require silex/silex:~2.0
# ./composer.json has been created
# Loading composer repositories with package information
# Updating dependencies (including require-dev)
# ...waiting..
# Writing lock file
# Generating autoload files
```### Create bootstrap file
```bash
# nano index.php
```
```php
get('/', function() {
return 'Hi! Silex.';
});/*
* Run the application
*/
$app->run();
```### Test
```bash
$ php -S localhost:8000
# Please look it on your browser => http://localhost:8000
```### Deploy to Google app engine
```bash
$ gcloud auth login
$ gcloud config set project
$ gcloud app deploy
```