/flask-starter

This project is initial setup using flask

Primary LanguageHTMLGNU General Public License v3.0GPL-3.0

Flask App Setup and Run Guide

This guide will help you set up and run a Flask web application.

Prerequisites

Before you begin, make sure you have the following installed on your system:

Installation

  1. Clone the project repository (if you haven't already):

    git clone <repository-url>
    cd <project-directory>
  2. Create a virtual environment (recommended):

    python -m venv venv
  3. Activate the virtual environment:

    • On Windows:

      venv\Scripts\activate
    • On macOS and Linux:

      source venv/bin/activate
  4. Install project dependencies:

    pip install -r requirements.txt

Database Setup

  1. Initialize the database (SQLite) and migrations:

    flask db init
  2. Create the initial migration:

    flask db migrate -m "Initial database setup"
  3. Apply the migration to create the database tables:

    flask db upgrade

Running the Application

  1. Start the Flask development server:

    python run.py
  2. Open a web browser and navigate to http://localhost:5000 to access the application.