rascunho

commit 2e1f8999491554e9b0aa8b063d6ecfc8db9cb470

Author: Pedro Lucas Porcellis <pedrolucasporcellis@gmail.com>

Rig app initialization with configuration

 app.py | 10 ++++++++++
 core/config.py | 6 ++++++


diff --git a/app.py b/app.py
new file mode 100644
index 0000000000000000000000000000000000000000..e9b5046d9e4bc0e6ec0b2d601613823a5a76db5e
--- /dev/null
+++ b/app.py
@@ -0,0 +1,10 @@
+from core.app import app
+from core.config import env
+
+if __name__ == '__main__':
+    debug = False
+
+    if env == 'dev':
+        debug = True
+
+    app.run(debug=debug)




diff --git a/core/config.py b/core/config.py
new file mode 100644
index 0000000000000000000000000000000000000000..4dc0e9abcac8f8d9a2424c98a0f7026ca033f7d9
--- /dev/null
+++ b/core/config.py
@@ -0,0 +1,6 @@
+from configparser import ConfigParser
+
+config = ConfigParser()
+config.read_file(open('config.ini'))
+
+env = config['meta']['env']