Skip to content

Lack of instructions for MySQL connection configuration #11

@NanaXiong00

Description

@NanaXiong00

Describe the issue:
Follow the steps of README.md, after running flask run --reload, open http://127.0.0.1:5000/ and clicking post a venue, the web page displays "Sorry...".
7

Repro Steps:

  • windows
  1. Download the project starter code locally.
  2. Initialize and activate a virtualenv using:
pip install virtualenv
python -m virtualenv venv
venv/Scripts/activate
  1. Install the dependencies
pip install -r requirements.txt
  1. Run the development server:
setx FLASK_APP app.py
setx FLASK_ENV development
setx FLASK_DEBUG true
flask run --reload
  1. Verify on the Browser: open http://127.0.0.1:5000/ and click post a venue.
  • codespaces
  1. open codespaces.
  2. Initialize and activate a virtualenv using:
python -m virtualenv venv
source venv/bin/activate
  1. Install the dependencies
pip install -r requirements.txt
  1. Run the development server:
export FLASK_APP=app.py
export FLASK_ENV=development
export FLASK_DEBUG=true
flask run --reload

6.Verify on the Browser: open http://127.0.0.1:5000/ and click post a venue.

Suggestion:
In the fourth step of Local Development, add instructions about “MySQL connection configuration” before Flask run --reload.
For example:

  • Add MySQL connection configuration to the environment.
export AZURE_MYSQL_USER=
export AZURE_MYSQL_PASSWORD=
export AZURE_MYSQL_HOST=
export AZURE_MYSQL_NAME=
export DEPLOYMENT_LOCATION=azure
  • And in windows, add configuration using:
setx AZURE_MYSQL_USER user
setx AZURE_MYSQL_PASSWORD password
setx AZURE_MYSQL_HOST host
setx AZURE_MYSQL_NAME dbname
setx DEPLOYMENT_LOCATION azure

@john0isaac and @hemarina for notification.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions