Skip to content

Instantly share code, notes, and snippets.

@Kd-Here
Created March 3, 2023 20:00
Show Gist options
  • Save Kd-Here/c887a1d4ef4b1a10777bc467c88860ce to your computer and use it in GitHub Desktop.
Save Kd-Here/c887a1d4ef4b1a10777bc467c88860ce to your computer and use it in GitHub Desktop.
from website import create_app
# We are able to import our flask app created in website folder bcoz of __init__.py that makes python file to package
app = create_app()
if __name__=='__main__':
app.run(debug=True)
#debug =True helps in development when we make changes it automatically reload server when project is completed you should use debug = Flase
"""This is means only run the app when our file name main is runn and when file name
is exceuted this run the command and starts the server
We don't want to start server when this file is imported so we use name == main """
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment