Just display "** Hello, world! **" in your browser.
only this.
For ʻindex.html, just type
! In Emmet on VS Code and write
<!DOCTYPE html>
<html lang="ja">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta http-equiv="X-UA-Compatible" content="ie=edge">
<title>Document</title>
</head>
<body>
<h1>Hello, world!</h1>
</body>
</html>
There is no particular reason to set port = '5555'
in sample.py
.
from flask import Flask, render_template
#Instantiation
app = Flask(__name__)
@app.route('/')
def index():
return render_template('index.html');
if __name__ == '__main__':
app.run(host='0.0.0.0', port='5555', debug=True)
>python sample.py