Skip to content

Commit

Permalink
adding hello.py
Browse files Browse the repository at this point in the history
  • Loading branch information
ldynia committed Jan 12, 2021
1 parent 9f25cb9 commit 339d718
Show file tree
Hide file tree
Showing 3 changed files with 21 additions and 12 deletions.
24 changes: 12 additions & 12 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,19 +1,19 @@
# ignore files with below extensions
# ignore files
.ash_history
.bash_history
.coverage
.env.secrets
package-lock.json
yarn.lock

# ignore files by extension
*.log
*.pyc
*.pyo
*.log
*.sqlite3

# ignore below files
.coverage
yarn.lock
package-lock.json
.env.secrets
.ash_history
.bash_history

# ignore below directories
# ignore directories
__pycache__/
node_modules/
.cache/
.pytest_cache/
node_modules/
3 changes: 3 additions & 0 deletions app/run.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,13 @@
$ uwsgi --ini app.uwsgi.development.ini --http-socket /var/run/app.sock
"""
import os

from app import create_app

app = create_app()

from app.src.hello import *

# link: https://stackoverflow.com/questions/34615743/unable-to-load-configuration-from-uwsgi#answer-37175998
if __name__ == "__main__":
PORT = os.getenv('PORT', 80)
Expand Down
6 changes: 6 additions & 0 deletions app/src/hello.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
from app.run import app


@app.route('/')
def hello_world():
return 'Hello, World!'

0 comments on commit 339d718

Please sign in to comment.