Skip to content
This repository was archived by the owner on May 20, 2025. It is now read-only.

beachfront-domains/golfer

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

golfer

The initial purpose of this repo was to interface with Caddy's built-in API...that API is unwieldy so instead we utilize Deno and Hono to make a basic API that:

  • creates .crt and .key certificate files for a supplied domain
  • creates a Caddy config of said domain
  • reloads Caddy

Prerequisites

  • Caddy: https://caddyserver.com
  • unzip: brew install unzip or apt install unzip -y
  • Deno: curl -fsSL https://deno.land/install.sh | sh
    • export DENO_INSTALL="/root/.deno"
    • export PATH="$DENO_INSTALL/bin:$PATH"
  • .env file with a strong TOKEN

Production

deno task start

Development

deno task dev
# using curl
curl -d '{ "domain": "www.lynk", "ip": "50.116.2.11" }' -H "Content-Type: application/json" -H "Authorization: Bearer TOKEN" -X POST http://localhost:3699/api

About

API for use with Caddy

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors