Skip to content

sdhutchins/flask-demo

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

28 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

This package is currently under development. codecov DOI

flask-demo

This is a demo Flask website that includes a login page.

In order to log in, the username is admin and the password is admin.

Install & Setup

Requirements

  • Python 3.9 or newer
  • pip

Instructions

  1. Clone or download this repository:

    git clone https://github.com/sdhutchins/flask-demo.git
    cd flask-demo
  2. Create a virtual environment (recommended):

    python -m venv venv
    source venv/bin/activate  # On Windows: venv\Scripts\activate
  3. Install dependencies:

    pip install -r requirements.txt
  4. (Optional) Create a .env file for environment variables:

    FLASK_DEBUG=True
    SECRET_KEY=your-secret-key-here

    If no .env file is present, the app will use default values.

Usage

Running the Development Server

Run the application using one of the following methods:

Method 1: Using run.py

python run.py

Method 2: Using Flask CLI

flask run

The application will be available at http://localhost:5000/.

Tests

Run tests with pytest:

pytest

Run tests with coverage report:

pytest --cov=app --cov-report=html

View the HTML coverage report by opening htmlcov/index.html in your browser.

ToDo

  • Add example for setting up a database.
  • Update css to Bootstrap 4.

About

A mobile-responsive demo flask website that includes a login page.

Topics

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Contributors 2

  •  
  •