Skip to content

opportunity-hack/backend-ohack.dev

Repository files navigation

Opportunity Hack Developer Portal (Backend)

Quickstart

pip install -r requirements.txt
  • Run the app
flask run
  • Create a .env file under the root project directory and populate it with the contents listed in our doc here

References

Running this on your laptop

The easy way with Heroku CLI

The longer way

Create a virtual environment. You can use:

  1. Miniconda (preferred)
  2. Virtual Env (venv)
  3. Anaconda
  4. Don't create a virtual environment at all and trample on a single Python environment you might already have

What are the diffs between Miniconda and Anaconda? See this

You'll need to run Python 3.9.13 (see runtime.txt) to match the same version that Heroku runs.

Once you have a virtual environment ready, you will want to install the project dependencies:

pip install -r requirements.txt

Create a .env file under the root project directory and populate it with the following content:

You will need to get these values from our Slack channel.

# Flask Settings
FLASK_APP=api
FLASK_RUN_PORT=6060
FLASK_ENV=development
PORT=6060


CLIENT_ORIGIN_URL=

# Firebase Settings
FIREBASE_CERT_CONFIG=

OPENAI_API_KEY=

#Propel Auth Settings
PROPEL_AUTH_KEY=
PROPEL_AUTH_URL=

Actually running the project

Command Line

Run the project in development mode:

flask run

Visual Studio Code

Interpreters

Set the interpreter via the command pallete Python: Select Interpreter (source)[https://code.visualstudio.com/docs/python/environments#_working-with-python-interpreters]

References

Getting Firestore Emulator Running

brew install java11
sudo ln -sfn /usr/local/opt/openjdk\@11/libexec/openjdk.jdk /Library/Java/JavaVirtualMachines/openjdk.11.jdk
npm install -g firebase-tools
gcloud auth application-default login
export FIRESTORE_EMULATOR_HOST="localhost:8080"
export GCLOUD_PROJECT="any-valid-name"

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages