Quick Start Automation
Start here for your 1st flask script
Every time I want to start a flask project I will create a directory strucutre and create files. Copy the quick start tempalate from Flask docs and then run the app. Too much work, right?
So I've automated it by adding a small script to my ~/.zshrc
file. If you are using bash this will be ~/.bashrc
for you
Add the following to your rc file
~/.bashrc or ~/.zshrc
Run source ~/.zshrc
or restart your terminal
Setup The App
Now everytime you need a new app all you have to do is go to your terminal and write
It will create a new directory
Create a virtualenv
Create a sample hello world file
Run the App
python hello.py
Test the API
Open the browser
Hit the following URLs
Last updated