This repo was made so that new users to Google App Engine should be able to create a frontend heavy app with a REST api with the least possible effort.
- Install dependencies with
git submodule init
andgit submodule update
- Download and install the Google App Engine SDK https://cloud.google.com/appengine/downloads
- Get a new Google App Engine application at http://appengine.google.com
- Insert the application ID you got in the previous step inn the top of the
app.yaml
file - Run your application locally with this command:
dev_appserver.py .
- Upload your application with this command:
appcfg.py update .
- Add/Edit files inside the html folder
- Add your models in the
python/models.py
file, there is a Item model that you can use as a starting point - Import your new models into the
main.py
file and choose the urls you want for your API. Use the Item urls as a starting point
- Change the
version:
line in theapp.yaml
file - Access your new version directly by going to
http://<your version>.<your app id>.appspot.com/
(all versions you have are available like this) - Set this new version as the default version being served at
http://<your app id>.appspot.com/
by selecting it as the default version in the application dashboard at http://appengine.google.com (the first version you uploaded is the default one if you don't change it)
- Delete the
appengine_config.py
file. This file namespace the data so all users by all intensive purposes have separate "databases"
- Delete the
appengine_config.py
file - Change the
@httpCode_loginRequired
decorator inpython/RestfulHandler.py
to@httpCode
- Remove the
login: required
line inapp.yaml
file
- Install npm (node) http://nodejs.org/
- Run the command
npm install
to get the required dependencies - Run the command
npm build
to generate thedist/
folder that contains your production ready code. - Upload your production code to Google App Engine with the command
appcfg.py update dist/
- Repeat step 3 every time your want to generate the production code (every time you have made changes)