vertex / backend-ohack.dev

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Are you here for Opportunity Hack 2022?

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

# AUTH0 Settings
CLIENT_ORIGIN_URL=
AUTH0_AUDIENCE=
AUTH0_DOMAIN=
AUTH0_USER_MGMT_CLIENT_ID=
AUTH0_USER_MGMT_SECRET=

# Firebase Settings
FIREBASE_CERT_CONFIG=

Run the project in development mode:

flask run

References

About


Languages

Language:Python 98.5%Language:Dockerfile 1.3%Language:Procfile 0.3%