-
Notifications
You must be signed in to change notification settings - Fork 0
/
app.py
33 lines (26 loc) · 990 Bytes
/
app.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
import coffeescript, flask
app = flask.Flask(__name__)
app.config.update(SERVER_NAME = 'stopiccot.com')
@app.route("/")
def home():
return flask.render_template('index.html')
@app.route("/", subdomain = "qr")
def qr():
return flask.render_template('qr_index.html')
@app.route("/", subdomain = "sun")
def sun():
return flask.render_template('sun_index.html')
@app.route('/js/<file>')
def js(file):
return coffeescript.compile_file('views/' + file + '.coffee')
app.add_url_rule(app.static_url_path + '/<path:filename>',
endpoint = 'static',
view_func = app.send_static_file,
subdomain = 'qr')
app.add_url_rule(app.static_url_path + '/<path:filename>',
endpoint = 'static',
view_func = app.send_static_file,
subdomain = 'sun')
if __name__ == "__main__":
app.config.update(SERVER_NAME = 'stopiccot.dev:4568')
app.run(host = '0.0.0.0', port = 4568, debug = True)