Browse Source

Add public-facing landing page

master
NGnius (Graham) 5 years ago
parent
commit
c48823381f
3 changed files with 22 additions and 2 deletions
  1. +5
    -1
      rxsmserver/__init__.py
  2. +14
    -0
      rxsmserver/templates/index.html
  3. +3
    -1
      scripts/run.sh

+ 5
- 1
rxsmserver/__init__.py View File

@@ -1,5 +1,5 @@
# Created 2019-09-10 by NGnius
from flask import Flask, Blueprint, jsonify, request, send_file
from flask import Flask, Blueprint, jsonify, request, send_file, render_template
import sqlite3 as dblib
from hashlib import sha512
from os import getcwd
@@ -19,6 +19,10 @@ def get_or_create_connection():
database_connections[thread_id] = dblib.connect(database_path)
return database_connections[thread_id]

@app.route('/', methods=['GET'])
def index():
return render_template('index.html')

@app.route('/release', methods=['POST'])
def create_or_modify_release():
try:


+ 14
- 0
rxsmserver/templates/index.html View File

@@ -0,0 +1,14 @@
<!DOCTYPE html>

<html lang="en">
<head>
<link rel="icon" href="https://raw.githubusercontent.com/NGnius/rxsm/develop/resources/images/icon-notext-2048.png" type="image/x-icon"/>
<link rel="shortcut icon" href="https://raw.githubusercontent.com/NGnius/rxsm/develop/resources/images/icon-notext-2048.png" type="image/x-icon"/>
<title>RXSM Update Server</title>
</head>
<body style="background-color: #404040; color: #20c420;">
<h1 style="text-align: center; padding-top: 10%; color: #20c420;">RXSM Update Server</h1>
<h3 style="text-align: center; color: #20c420;">This domain is designed for robots, not you, you silly dinosaur!</h3>
<h5 style="text-align: center; color: #20c420;"><a style="text-decoration:none; color: #208020;" href="https://git.exmods.org/rxsm/rxsm-server">Read about the RXSM update API</a>.</h5>
</body>
</html>

+ 3
- 1
scripts/run.sh View File

@@ -1,3 +1,5 @@
#!/bin/sh

python3 rxsmserver/__init__.py
cd rxsmserver
python3 __init__.py
cd ..