Very simple and dumb microservice for handling caddy tls ask requests Its currently far from effecient, and ill probably make it better in the future, but it works for now :3
This was built around my specefic stack etc, so this assumes you have supabase set up, with a domains table set up with something like this
interface Domain {
id: string; // UUID
domain_name: string;
owner_user_id: string; // UUID
read_only: boolean; // If true, this domain cannot be deleted by sync jobs
created_at: string; // timestampz
updated_at: string; // timestampz
}It is meant to run in a docker stack, so you should include it in your docker-compose stack file like this:
services:
prettyplease:
build:
context: ./src
environment:
- SUPABASE_URL=${SUPABASE_URL}
- SUPABASE_SERVICE_ROLE_KEY=${SUPABASE_SERVICE_ROLE_KEY}
- PORT=8080
restart: unless-stopped
container_name: prettyplease
ports:
- "8080:8080"To test locally without docker, you just need to install the deps & dev deps
npm install --include-devnpm install dotenvx
# or globally
npm install -g dotenvxthen you can simply run / build :3
npm run build
npm run dev
npm run start