Skip to content

An online course marketplace built with Python Flask, HTML, CSS and JavaScript.

Notifications You must be signed in to change notification settings

shinushaju/olearn

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

flask-app

Install Virtual Environment

Python 3 comes with a virtual environment module called venv preinstalled. If you have Python 3 installed, skip this step.
If you have Python 2, follow the given instructions:

Install virtualenv on Windows:

py -2 -m pip install virtualenv

Install virtualenv on Linux:

sudo apt install python-virtualenv

Create an Environment 'env'

Run the commands:

Create environment on Windows:

For Python 3:

py -3 -m venv env

For Python 2:

py -2 -m virtualenv env

Create environment on Linux:

For Python 3:

python3 -m venv env

For Python 2:

python -m virtualenv env

Activate the Environment

Run the commands:

On Windows:

env\Scripts\Activate.ps1

On Linux:

source env/bin/activate

Install Flask

python -m pip install flask

Set the FLASK_APP Environment Variable.

Run the commands:

On Windows:

setx FLASK_APP=app
setx FLASK_ENV=development

On Linux:

export FLASK_APP=app
export FLASK_ENV=development

Run the Flask App

flask run

Git Commands

git init - Initializes a git repository

git pull https://github.com/ShinuShaju/flask-app - pulls the code from remote repository

git add . or git add filename - adds a file/files to the git staging area
git commit -m "commit message in double quotes"

git branch -m main - sets main branch as main
git remote add origin https://github.com/ShinuShaju/flask-app
git remote set-url origin https://github.com/ShinuShaju/flask-app

git push -u origin main - push to a remote git repository