This repository contains the API server, primarily for communicating with Firebase. It's a single Node.js file, index.mjs
that runs a Polka server which sends data to Firebase.
The following environment variables are required.
Firebase:
FIREBASE_DATABASE_URL
is the full Firebase database URLFIREBASE_SERVICE_ACCOUNT
is the service account key in JSON
Authentication:
TWT_SECRET
is the secret used to sign TWTsJWT_SECRET
is the secret used to sign JWTsROOT_USERNAME
is the username for logging inROOT_PASSWORD
is the hashed password for logging in
AWS-managed ElasticSearch:
AWS_ELASTIC_HOST
is the endpointAWS_ACCESS_KEY_ID
is the AWS access keyAWS_SECRET_ACCESS_KEY
is the AWS secret keyAWS_REGION
is the AWS region
Sales:
PIPEDRIVE_API_KEY
is the Pipedrive CRM API keySLACK_BOT_ACCESS_TOKEN
is the access token of the Slack bot
Locally, these environment variables are loaded from a .env
. This repository also uses GitHub Actions CI/CD and triggers an endpoint for deployment from the master
branch. Optionally, you may add the required environment variables as repository secrets (see Creating and storing encrypted secrets).
An open source project by Koj.
Furnish your home in style, for as low as CHF175/month →