Skip to content

mboy1011/flasks-app

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

25 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

FLASKS-APP

FLASKS-APP is a simple web app project using Python3, PostgreSQL, Flask, MaterializeCSS and Heroku as a cloud server.

Prerequisite:

  • Basic knowledge to Programming (Python).
  • Basic knowledge to RDBMS or SQL Database (MySQL, PostgreSQL).
  • Basic knowledge to Web (HTML, JS, CSS).

Requirements:

Python3 Flask Heroku

Installation:

  1. Download or Clone this Repository.
  2. Create a Python environment:
  • python3 -m venv venv
  • source venv/Scripts/activate
  1. Install Python requirements pip3 install -r requirements
  2. Export the variable of your database url provided by Heroku Postgres:
  • export DATASEBASE_URL=url
  1. Export the flask environment and app:
  • export FLASK_APP=application.py
  • export FLASK_ENV=development
  1. Create Database on Heroku Postgres:
  • Copy this SQL Code ' CREATE TABLE tbl_employee ( emp_id SERIAL NOT NULL, f_name VARCHAR NOT NULL, l_name VARCHAR NOT NULL, m_name VARCHAR NOT NULL, added TIMESTAMP DEFAULT CURRENT_TIMESTAMP ); CREATE TABLE tbl_users( id SERIAL NOT NULL, emp_id INTEGER NOT NULL, username VARCHAR NOT NULL, password VARCHAR NOT NULL, added TIMESTAMP DEFAULT CURRENT_TIMESTAMP ); '
  1. Run the App: flask run

Compatibility