Skip to content

opportunity-hack/backend-ohack.dev

Folders and files

NameName
Last commit message
Last commit date

Latest commit

08d312d Â· Feb 10, 2025
Nov 23, 2022
Jul 2, 2024
Oct 15, 2024
Feb 10, 2025
Oct 22, 2024
Feb 10, 2025
Nov 23, 2022
Feb 10, 2025
Aug 31, 2024
Feb 10, 2025
Jun 27, 2024
Jul 2, 2024
Jul 2, 2024
Jul 22, 2024
Jul 2, 2024
Jul 2, 2024
Jun 15, 2022
Apr 17, 2024
Nov 19, 2023
Jul 30, 2024
Jul 24, 2022
Jan 27, 2023
Feb 10, 2025
Jun 14, 2022

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