Skip to content
This repository has been archived by the owner on Sep 29, 2023. It is now read-only.

Commit

Permalink
Merge pull request #1 from chukysoria/dev
Browse files Browse the repository at this point in the history
Upload requirement
  • Loading branch information
chukysoria committed Aug 17, 2017
2 parents 121a024 + accb784 commit 03a99f8
Show file tree
Hide file tree
Showing 5 changed files with 36 additions and 3 deletions.
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -99,3 +99,6 @@ ENV/

# mypy
.mypy_cache/

#vscode
.vscode/
21 changes: 21 additions & 0 deletions app.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
{
"name": "bi-redirector",
"description": "Redirect queries from PowerBI",
"scripts": {
},
"env": {
"PORT": {
"required": true
}
},
"formation": {
},
"addons": [

],
"buildpacks": [
{
"url": "heroku/python"
}
]
}
4 changes: 1 addition & 3 deletions redirector.py
Original file line number Diff line number Diff line change
@@ -1,9 +1,8 @@
"""
Redirector
"""
import os

from flask import Flask, request, redirect
from settings import PORT

APP = Flask(__name__)

Expand All @@ -20,5 +19,4 @@ def redirect_to_box():
return redirect(new_url)

if __name__ == '__main__':
PORT = int(os.environ.get('PORT', 5000))
APP.run(host='0.0.0.0', port=PORT, debug=True)
Binary file modified requirements.txt
Binary file not shown.
11 changes: 11 additions & 0 deletions settings.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
# settings.py
from os import environ
from dotenv import load_dotenv, find_dotenv

load_dotenv(find_dotenv())

DOWNLOAD_PATH = environ.get('DOWNLOAD_PATH')
REPORT_SERVER = environ.get('REPORT_SERVER')
REPORT_USERNAME = environ.get('REPORT_USERNAME')
REPORT_PASSWORD = environ.get('REPORT_PASSWORD')
PORT = int(environ.get('PORT'))

0 comments on commit 03a99f8

Please sign in to comment.