Skip to content

Commit

Permalink
Add simple backend
Browse files Browse the repository at this point in the history
  • Loading branch information
Saluev committed Mar 6, 2019
1 parent 15f24d6 commit 4eea5e3
Show file tree
Hide file tree
Showing 2 changed files with 25 additions and 0 deletions.
21 changes: 21 additions & 0 deletions backend/server.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
import os.path

import flask
import flask_cors


class HabrAppDemo(flask.Flask):

def __init__(self, *args, **kwargs):
super().__init__(*args, **kwargs)

flask_cors.CORS(self)


app = HabrAppDemo("habr-app-demo")

env = os.environ.get("APP_ENV", "dev")
print(f"Starting application in {env} mode")
app.config.from_object(f"backend.{env}_settings")

app.secret_key = "nu privet habravchanin"
4 changes: 4 additions & 0 deletions requirements.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
flask
flask-cors
gevent
gunicorn

0 comments on commit 4eea5e3

Please sign in to comment.