Skip to content
This repository has been archived by the owner on Oct 5, 2024. It is now read-only.

utmmcss/deerhacks-backend

Repository files navigation

DeerHacks API

DeerHacks Image

DeerHacks Hackathon 2024 Backend API

Website Status

Setup

  1. Run go build to install dependencies
  2. Add the required .env file with the schema specified below
  3. Gather credentials from microservices and add it to the .env file

Relevant URL'S

Getting Started

First, run the development server:

go run main.go

Send API requests to http://localhost:8000 (assuming port specified in .env file is 8000) with tools like Postman

.env format

PORT=8000
DB_URL  =  "host=<server name here> user=<username here> password=<password here> dbname=<same as username> port=5432 sslmode=disable"
SECRET  =  "youcantypeanythingyouwanthere"

# From the Discord Developer Portal
CLIENT_ID  =  ""
CLIENT_SECRET  =  ""
BOT_TOKEN  =  ""
REDIRECT_URI  =  ""

# The discord server your discord bot will be in
GUILD_ID  =  "967161405017055342"

#Change this to "production" if public
APP_ENV  =  "development"
REGISTRATION_CUTOFF=1704085200  # (2024-01-01 00:00:00 EST)

# AWS IAM Credentials. Ensure full S3 access is given
AWS_ACCESS_KEY_ID  =  ""
AWS_SECRET_ACCESS_KEY  =  ""

# For sending emails
BREVO_API_KEY  =  ""