serving index
parent
7752a8b4a2
commit
4715b12864
8
README
8
README
|
@ -0,0 +1,8 @@
|
|||
Test server:
|
||||
w ./test znajduje się trywialna aplikacja flaskowa i konfig do uwsgi, pozwalający się pobawić.
|
||||
|
||||
usage:
|
||||
itanic$ cd test
|
||||
itanic$ uwsgi static.ini
|
||||
|
||||
a potem skierować przeglądarkę na itanic:9091. Port jest w static.ini.
|
|
@ -1,2 +1,5 @@
|
|||
from flask import Flask
|
||||
app = Flask(__name__, static_folder='../', static_url_path='')
|
||||
from flask import Flask, render_template
|
||||
app = Flask(__name__, static_folder='../', static_url_path='', template_folder='../')
|
||||
@app.route('/')
|
||||
def index():
|
||||
return render_template('index.html')
|
||||
|
|
Loading…
Reference in New Issue