HOD42 / DevOps-Course-Starter

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

DevOps Apprenticeship: Project Exercise

Getting started

The project uses a virtual environment to isolate package dependencies. To create the virtual environment and install required packages, run the following from a bash shell terminal:

On macOS and Linux

$ source setup.sh

On Windows (Using PowerShell)

$ .\setup.ps1

On Windows (Using Git Bash)

$ source setup.sh --windows

Once the setup script has completed and all packages have been installed, start the Flask app by running:

$ flask run

You should see output similar to the following:

 * Serving Flask app "app" (lazy loading)
 * Environment: development
 * Debug mode: on
 * Running on http://127.0.0.1:5000/ (Press CTRL+C to quit)
 * Restarting with fsevents reloader
 * Debugger is active!
 * Debugger PIN: 226-556-590

Now visit http://localhost:5000/ in your web browser to view the app.

Notes

The .env file is used by flask to set environment variables when running flask run. This enables things like developement mode (which also enables features like hot reloading when you make a file change).

  • There's also a SECRET_KEY variable which is used to encrypt the flask session cookie.

When running setup.sh, the .env.template file will be copied to .env if the latter does not exist.

About


Languages

Language:Python 46.6%Language:HTML 37.2%Language:Shell 9.7%Language:PowerShell 6.5%