summaryrefslogtreecommitdiff
path: root/templates
diff options
context:
space:
mode:
Diffstat (limited to 'templates')
-rw-r--r--templates/api.py27
-rw-r--r--templates/api_server.service15
-rw-r--r--templates/index.html37
3 files changed, 0 insertions, 79 deletions
diff --git a/templates/api.py b/templates/api.py
deleted file mode 100644
index b04ef77..0000000
--- a/templates/api.py
+++ /dev/null
@@ -1,27 +0,0 @@
-from flask import Flask, request, jsonify, render_template
-
-app = Flask(__name__)
-
-
-@app.route("/")
-def index():
- return render_template("index.html")
-
-
-@app.route("/api/run-script", methods=["POST"])
-def run_script():
- data = request.json
- if not data:
- return jsonify({"error": "No data provided"}), 400
-
- script_result = my_script_logic(data.get("input"))
-
- return jsonify({"result": script_result})
-
-
-def my_script_logic(input_value):
- return f"Processed input: {input_value}"
-
-
-if __name__ == "__main__":
- app.run(host="0.0.0.0", port=5000, debug=True)
diff --git a/templates/api_server.service b/templates/api_server.service
deleted file mode 100644
index b69c5e4..0000000
--- a/templates/api_server.service
+++ /dev/null
@@ -1,15 +0,0 @@
-[Unit]
-Description=REST API Server for RPI
-After=network.target
-
-[Service]
-ExecStart=/usr/bin/python3 /home/pi/I2C/bin/main.py
-WorkingDirectory=/home/pi/I2C
-User=nasr
-Group=pi
-Restart=always
-Environment="PYTHONUNBUFFERED=1"
-
-[Install]
-WantedBy=multi-user.target
-
diff --git a/templates/index.html b/templates/index.html
deleted file mode 100644
index 5436dbd..0000000
--- a/templates/index.html
+++ /dev/null
@@ -1,37 +0,0 @@
-<!DOCTYPE html>
-<html lang="en">
-
-<head>
- <meta charset="UTF-8">
- <meta name="viewport" content="width=device-width, initial-scale=1.0">
- <title>CONSOLE</title>
- <link rel="stylesheet" href="static/styles.css">
- <script src="static/main.mjs" defer></script>
-</head>
-
-<body>
- <nav class="navigation">
- <a href="index.html" class="home">HOME</a>
- <h2>I2C MODES</h2>
- <a href="https://www.github.com/nasrlol" target="_blank">GITHUB</a>
- </nav>
-
- <section class="controls">
- <a href="page/overview.html" class="resources">Resources</a>
- <a href="page/notes.html" class="speech_trans">Speech Transcriber</a>
- <a href="page/recourses.html" class="notes">Display a Message</a>
- <a href="page/speech.html" class="general">General Tools</a>
- </section>
- <section>
- <p>This is the main control center for the I2C deivce. You can find
- the main code and information about the project under my <a href="https://github.com/nasrlol">GITHUB</a></p>
-
- </section>
-
- <footer>
- <p>Created by <a href="https://www.github.com/nasrlol" target="_blank">nsrddyn</a>. All rights reserved &copy;
- 2024.</p>
- </footer>
-</body>
-
-</html>