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

pvdthings/api

 
 

Repository files navigation

PVD Things API

Environment variables

You'll need to set these environment variables in a .env file at the root of the project folder:

NODE_ENV=development // or 'production'

API_KEY=[value]

AIRTABLE_KEY=[value]
AIRTABLE_BASE_ID=[value]

SUPABASE_URL=[value]
SUPABASE_PUB_ANON_KEY=[value]

// Determines which Discord accounts are allowed to authenticate with the API
DISCORD_WHITELIST="[email protected] [email protected]"

// Determines which users can access admin features
ADMIN_WHITELIST="[email protected]"

// Webhook URL used for sending loan reminder messages
LOAN_REMINDER_WEBHOOK_URL=[value]

// Webhook URL used for updating loan due dates
UPDATE_DUE_DATES_WEBHOOK_URL=[value]

Local Development

Run the server

npm run install // on first run
npm run start

The server will start on port 8088.

When running locally, no authentication is needed for the lending API. In production environments, these endpoints require tokens provided by Supabase Authentication (via Discord).

Documentation

Swagger Docs are hosted at http://localhost:8088/docs.

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • JavaScript 99.3%
  • Dockerfile 0.7%