Open stuartmac opened 11 months ago
The lack of a page at the server root is intentional and allows you to create your own page there. Otherwise, there would be a routing conflict.
In order to add your own page at the root, create a python file named e.g. myroutes.py inside the project directory containing a flask blueprint.
# myroutes.py
import flask
blueprint = flask.Blueprint('welcome', __name__, url_prefix='/')
@blueprint.route('/')
def index():
return "Welcome to slivka!"
Then, append the following to the end of the wsgi.py file
import myroutes
application.register_blueprint(myroutes.blueprint)
I suggest adding a simple landing page at the server root (or /slivka or another suitable location) to make it easy to confirm that the server is up and running.
Just a basic HTML landing page or a minimal Flask view that displays a "Hello World" or "Welcome to slivka-bio" message.