Project setup - csemanish12/flask_blog GitHub Wiki
Create a blog package
1. create a directory and name it blog(any name)
2. create __init__.py inside blog
Install flask
1. install flask using the command > pip install flask
Initialize flask app(create your own flask server)
add the following codes in _init_.py file inside your blog
from flask import Flask
app = Flask(__name__)
Running your app
create a run.py file in root directory of your project and add the following codes
from blog import app
if __name__ == '__main__':
app.run()
your project structure should be like this
├── blog
│ ├── __init__.py
├── run.py
Enter the command "python run.py" to run your application. If you have configured everything properly you should see this in your terminal
```python
* Serving Flask app "blog" (lazy loading)
* Environment: production
WARNING: This is a development server. Do not use it in a production deployment.
Use a production WSGI server instead.
* Debug mode: off
* Running on http://127.0.0.1:5000/ (Press CTRL+C to quit)
Implementation can be found over this commit