Browse Source

Create routes file, base template, index page, run script, and touch

database
compression
Joshua-Gordon 3 years ago
parent
commit
184335e965
  1. 1
      .gitignore
  2. 13
      routes.py
  3. 2
      run.sh
  4. 12
      templates/base.html
  5. 4
      templates/index.html

1
.gitignore

@ -0,0 +1 @@
*.db

13
routes.py

@ -0,0 +1,13 @@
from flask import Flask, render_template
import sys
app = Flask(__name__)
@app.route('/')
def root():
return render_template('index.html')
if __name__ == '__main__':
port = sys.argv[1]
app.run(port=port)

2
run.sh

@ -0,0 +1,2 @@
#!/bin/bash
/usr/bin/python2 routes.py 5000

12
templates/base.html

@ -0,0 +1,12 @@
<html>
<head>
<meta charset='utf-8'>
{% block style %}
{% endblock %}
<title>COSI Random</title>
</head>
<body class="content">
{% block content %}{% endblock %}
</body>
</html>

4
templates/index.html

@ -0,0 +1,4 @@
{% extends "base.html" %}
{% block content %}
<p>Hello, welcome to COSI Random! Have a complementary bit: 0</p>
{% endblock %}
Loading…
Cancel
Save