Demo User App
This demo app demonstrates the use of Flask-Login for a simple login system for a Flask application.
Setup
Note: This app uses a PostgreSQL database along with Flask-SQLAlchemy
and Flask-Migrate
.
To begin using this app you can do the following:
- Clone the repository to your local machine.
- Create a Python virtual environment e.g.
python -m venv venv
(orpython3 -m venv venv
) - Enter the virtual environment using
source venv/bin/activate
(or.\venv\Scripts\activate
if you are using Windows) - Install the dependencies using Pip. e.g.
pip install -r requirements.txt
. Note: Ensure you have PostgreSQL already installed and a database created. - Copy the
.env.sample
file and rename to.env
. Edit the file and enter your database credentials and database name. - Run the migrations by typing
flask db upgrade
- Ensure you add a user to your database to test the login system.
- Start the development server using
flask --app app --debug run
.