Last active
September 15, 2021 18:21
-
-
Save WillSams/d34f451de0f3b74253e2 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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