summaryrefslogtreecommitdiff
path: root/devel_server.py
diff options
context:
space:
mode:
authorxengineering <mail2xengineering@protonmail.com>2019-09-07 11:35:57 +0200
committerxengineering <mail2xengineering@protonmail.com>2019-09-07 11:35:57 +0200
commit1516e382a3106f62487e1c9ea8d174a288cd4144 (patch)
treedaba469ed86a45a808545bc1855878542c63df57 /devel_server.py
parent4fdc1f73ab4a6dd8227aa702d0c70021c1536b96 (diff)
downloadarchinstall-1516e382a3106f62487e1c9ea8d174a288cd4144.tar
archinstall-1516e382a3106f62487e1c9ea8d174a288cd4144.tar.zst
archinstall-1516e382a3106f62487e1c9ea8d174a288cd4144.zip
Added code.
Diffstat (limited to 'devel_server.py')
-rw-r--r--devel_server.py41
1 files changed, 41 insertions, 0 deletions
diff --git a/devel_server.py b/devel_server.py
new file mode 100644
index 0000000..31294ea
--- /dev/null
+++ b/devel_server.py
@@ -0,0 +1,41 @@
+
+
+# archinstall - A minimal Installation Script for Arch Linux
+# Copyright (C) 2019 xengineering
+
+# This program is free software: you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation, either version 3 of the License, or
+# (at your option) any later version.
+
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+
+# You should have received a copy of the GNU General Public License
+# along with this program. If not, see <https://www.gnu.org/licenses/>.
+
+
+import sys
+from flask import Flask
+application = Flask(__name__)
+
+
+filename = sys.argv[1]
+print(
+ "Provide '{filename}' on port 5000.".format(filename=filename)
+ )
+
+
+@application.route("/")
+def hello():
+
+ with open(filename, "r") as f:
+ content = f.read()
+
+ return content
+
+
+if __name__ == "__main__":
+ application.run(host='0.0.0.0')