hello
This commit is contained in:
parent
27ba8ab59e
commit
15081d0409
6
main.py
6
main.py
@ -1,10 +1,12 @@
|
|||||||
#!/usr/bin/env python3
|
#!/usr/bin/env python3
|
||||||
from flask import Flask
|
from flask import Flask
|
||||||
|
from flask import render_template
|
||||||
|
|
||||||
app = Flask(__name__)
|
app = Flask(__name__)
|
||||||
|
|
||||||
@app.route("/")
|
@app.route("/")
|
||||||
def hello_world():
|
def hello_world():
|
||||||
return "<p>Hello, World!</p>"
|
return render_template('index.html')
|
||||||
|
|
||||||
app.run()
|
if __name__ == '__main__':
|
||||||
|
app.run(port=8080, debug=True)
|
||||||
|
9
templates/index.html
Normal file
9
templates/index.html
Normal file
@ -0,0 +1,9 @@
|
|||||||
|
<!DOCTYPE html>
|
||||||
|
<html>
|
||||||
|
<head>
|
||||||
|
<title>thing</title>
|
||||||
|
</head>
|
||||||
|
<body>
|
||||||
|
<h1>hi</h1>
|
||||||
|
</body>
|
||||||
|
</html>
|
Loading…
Reference in New Issue
Block a user