Clone Git Repository
git clone https://github.com/aditya1819/flaskblog.git
or Download from github Use virtual env (optional)
Install required python libraries
pip install -r requirements.txt
Create database and required Tables from following SQL commands in MySQL Command line
CREATE DATABASE flaskblog;USE flaskblog;CREATE TABLE articles (id INT(11) AUTO_INCREMENT PRIMARY KEY,title VARCHAR(255),author VARCHAR(50),body TEXT,create_date TIMESTAMP DEFAULT CURRENT_TIMESTAMP);CREATE TABLE users (id INT(11) AUTO_INCREMENT PRIMARY KEY,name VARCHAR(50),username VARCHAR(50),password VARCHAR(200),email VARCHAR(100),register_date TIMESTAMP DEFAULT CURRENT_TIMESTAMP);Add MySQL Localhost Database details to dbconnect.py replace user and passwd by the MySQL user you are using or root
class dbconnect():
host = 'localhost'
user = 'root'
passwd = 'root123'
cursorclass = 'DictCursor'Run app.py ( Please make sure Port 5000 is available )
py app.pyLocalHost address
http://127.0.0.1:5000/
or
localhost:5000