Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save WillSams/d34f451de0f3b74253e2 to your computer and use it in GitHub Desktop.
Save WillSams/d34f451de0f3b74253e2 to your computer and use it in GitHub Desktop.
mkdir -p MyWebApp && cd MyWebApp
virtualenv venv
source venv/bin/activate
pip install flask
pip freeze > requirements.txt
vim hello.py
************************************
import os
from flask import Flask
app = Flask(__name__)
@app.route('/')
def hello():
return 'Hello World!'
************************************
vim wsgi.py
*************************************
from hello import app as application
*************************************
git init
git remote add origin ssh+git://<login>@git.<datacenter>.gpaas.net/default.git
vim .gitignore
************************************
#venv #if we are deploying to remote server, uncomment this line. If to GitHub, do not push virtual environment
*.pyc
************************************
git add .
git commit -am "Initial commit."
git push origin master
ssh <login>@git.<datacenter>.gpaas.net 'deploy default.git'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment