several changes implementing flask
This commit is contained in:
parent
b72fce9038
commit
294f8b84ab
6 changed files with 41 additions and 7 deletions
|
|
@ -26,8 +26,6 @@ server {
|
|||
add_header Strict-Transport-Security "max-age=31536000; includeSubDomains" always;
|
||||
|
||||
location / {
|
||||
try_files $uri $uri/ =404;
|
||||
root /var/www/html;
|
||||
index index.html;
|
||||
proxy_pass http://127.0.0.1:5000;
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -6,8 +6,7 @@ app = Flask(__name__)
|
|||
|
||||
@app.route("/")
|
||||
def index():
|
||||
return "with Flask"
|
||||
return render_template("/var/www/html/index.html")
|
||||
return render_template("index.html")
|
||||
|
||||
|
||||
app.run(host="127.0.0.1", port=5000)
|
||||
|
|
@ -179,7 +179,6 @@ done
|
|||
###### NGINX MAINTENANCE & LANDING PAGE
|
||||
|
||||
sudo rm -rf /var/www/html
|
||||
sudo cp -R assets/html /var/www
|
||||
|
||||
if ! [ "$(sudo nginx -t > /dev/null 2>&1)" ]; then ### NGINX CONF CHECK
|
||||
echo -e "\n ${LGN}Nginx configuration checks out...${CRS}"
|
||||
|
|
|
|||
|
|
@ -5,7 +5,7 @@
|
|||
|
||||
<title>LoMeS | Meshtastic</title>
|
||||
<link rel="icon" href="data/images/favicon.ico">
|
||||
<link rel="stylesheet" href="style.css">
|
||||
<link rel="stylesheet" href="{{ url_for('static', filename='style.css') }}">
|
||||
</head>
|
||||
<body>
|
||||
<section>
|
||||
|
|
|
|||
29
static/lndpg.html
Normal file
29
static/lndpg.html
Normal file
|
|
@ -0,0 +1,29 @@
|
|||
<!DOCTYPE html>
|
||||
<head>
|
||||
<meta http-equiv="content-type" content="text/html" charset="utf-8">
|
||||
<meta name="viewport" content="width=device-width" initial-scale="1.0">
|
||||
|
||||
<title>LoMeS | Meshtastic</title>
|
||||
<link rel="icon" href="data/images/favicon.ico">
|
||||
<link rel="stylesheet" href="style.css">
|
||||
</head>
|
||||
<body>
|
||||
<section>
|
||||
<header>
|
||||
<img class="icon" src="data/images/lomes.svg">
|
||||
<h1>Welcome to LoMeS</h1>
|
||||
</header>
|
||||
<div class="textBox">
|
||||
<h3>A Local Meshtastic Server in development</h3>
|
||||
<p>If you see this site, means "LoMeS" development environment is running!</p>
|
||||
<p>Thanks for collaborating and trying to make things mor real...</p>
|
||||
</div>
|
||||
<!-- <div class="textBox">
|
||||
<h3>Configuration Summary</h3>
|
||||
<div class="confBox">
|
||||
<link rel="import" href="assets/html/data/install_log/log.html">
|
||||
</div>-->
|
||||
</div>
|
||||
</section>
|
||||
</body>
|
||||
</html>
|
||||
9
templates/base.html
Normal file
9
templates/base.html
Normal file
|
|
@ -0,0 +1,9 @@
|
|||
<html>
|
||||
<head>
|
||||
<title>{% block title %} {% endblock %}</title>
|
||||
</head>
|
||||
<body>
|
||||
{% block content %}
|
||||
{% endblock %}
|
||||
</body>
|
||||
</html>
|
||||
Loading…
Add table
Add a link
Reference in a new issue