[dev-gnome-web] Add boilerplate



commit 53ec25c518d7cc8ab5e5abb7f6788ab8ee756ec4
Author: Lasse Schuirmann <lasse schuirmann gmail com>
Date:   Thu Jan 28 11:47:53 2016 +0100

    Add boilerplate

 .gitignore       |   11 +++++++++++
 manage.py        |   14 ++++++++++++++
 requirements.txt |    1 +
 server/app.py    |   16 ++++++++++++++++
 server/config.py |    3 +++
 5 files changed, 45 insertions(+), 0 deletions(-)
---
diff --git a/.gitignore b/.gitignore
new file mode 100644
index 0000000..aedd2ea
--- /dev/null
+++ b/.gitignore
@@ -0,0 +1,11 @@
+.idea
+__pycache__
+*.db
+*~
+*.swp
+*.pdf
+*.pyc
+*.orig
+.cache
+.coverage*
+client/vendor/
diff --git a/client/.gitkeep b/client/.gitkeep
new file mode 100644
index 0000000..e69de29
diff --git a/manage.py b/manage.py
new file mode 100755
index 0000000..7e8dd7e
--- /dev/null
+++ b/manage.py
@@ -0,0 +1,14 @@
+#!/usr/bin/env python3
+
+"""
+This is an application management application that allows to run the server.
+"""
+
+from flask_script import Manager
+from server.app import app
+
+manager = Manager(app)
+
+
+if __name__ == '__main__':
+    manager.run()
diff --git a/requirements.txt b/requirements.txt
index 632a1ef..abca9ff 100644
--- a/requirements.txt
+++ b/requirements.txt
@@ -1 +1,2 @@
 Flask==0.10.1
+Flask-Script==2.0.5
diff --git a/server/app.py b/server/app.py
new file mode 100644
index 0000000..ada7cab
--- /dev/null
+++ b/server/app.py
@@ -0,0 +1,16 @@
+"""
+Contains the main Flask application.
+"""
+
+from os.path import dirname, abspath, join
+
+from flask import Flask
+
+current_path = dirname(__file__)
+client_path = abspath(join(current_path, '..', 'client'))
+
+app = Flask(__name__,
+            static_url_path='',
+            static_folder=client_path,
+            template_folder=client_path)
+app.config.from_object('server.config')
diff --git a/server/config.py b/server/config.py
new file mode 100644
index 0000000..1abff63
--- /dev/null
+++ b/server/config.py
@@ -0,0 +1,3 @@
+"""
+This file contains configuration options for the server side application.
+"""


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]