Setup for local development
First make sure you have Python 3 installed by running
python --versionin your terminal. If it doesn't show
3.0or higher, then install Python 3. Suggested instructions: https://docs.python-guide.org/starting/installation/
Clone this repo! See: https://help.github.com/articles/cloning-a-repository/
In your terminal, go into the newly-created folder for this repo with
To verify that you're in the correct folder, you can use the command
pwd(print working directory)
Create a virtual environment with this command:
python3 -m venv venvon Mac, or
py -3 -m venv venvon Windows.
Note: This lets you use different versions of Python and Python modules for each of your Python projects separately, so they don't conflict with each other.
Activate the virtual environment by running this terminal command while you're inside the
source venv/bin/activateon Mac, or
venv\Scripts\activateon Windows. You'll know it worked if you now see
(venv)appear before your shell prompt.
To exit out of the current virtual environment when you're switching between projects, just run
Install the project dependencies by running this terminal command:
pip install -r requirements.txt
Finally, to start a local server and run the Codachrome app, run
flask runin terminal.
You'll see something like
Running on http://127.0.0.1:5000/appear in your terminal. Navigate to that URL in your web browser to see the app!
Or you can use the URL
localhost:5000as a shortcut.