diff --git a/ddln_cli/dev.sh b/ddln_cli/dev.sh new file mode 100755 index 0000000..62dfe6b --- /dev/null +++ b/ddln_cli/dev.sh @@ -0,0 +1,28 @@ +#!/bin/bash +user_data_dir="${1:-./profile}" +user_id="${2:-b38b623c-c3fa-4351-9cab-50233c99fa4e}" + +"/Applications/Google Chrome.app/Contents/MacOS/Google Chrome" \ + --disable-setuid-sandbox \ + --disable-infobars \ + --no-first-run \ + --hide-scrollbars \ + --disable-notifications \ + --disable-background-timer-throttling \ + --disable-backgrounding-occluded-windows \ + --disable-breakpad \ + --disable-component-extensions-with-background-pages \ + --disable-extensions \ + --disable-features=TranslateUI,BlinkGenPropertyTrees \ + --disable-ipc-flooding-protection \ + --disable-renderer-backgrounding \ + --enable-features=NetworkService,NetworkServiceInProcess \ + --force-color-profile=srgb \ + --metrics-recording-only \ + --mute-audio \ + --disable-gpu \ + --repl --headless \ + --user-data-dir="$user_data_dir" \ + --remote-debugging-port=9332 \ + --enable-logging=stderr \ + "https://localhost:8443/connect/$user_id?bootstrap" diff --git a/deno/dev.sh b/deno/dev.sh new file mode 100755 index 0000000..eba42e0 --- /dev/null +++ b/deno/dev.sh @@ -0,0 +1,5 @@ +#!/bin/bash +TLS_CERT=../certs/localhost.pem \ +TLS_KEY=../certs/localhost-key.pem \ +PORT=8443 \ +deno run --inspect --allow-all --unstable-temporal --watch ddln_server.ts diff --git a/setup.sh b/setup.sh new file mode 100755 index 0000000..2305f89 --- /dev/null +++ b/setup.sh @@ -0,0 +1,17 @@ +#!/bin/bash +set -e + +# Install mkcert if needed +if ! command -v mkcert &>/dev/null; then + echo "Installing mkcert..." + brew install mkcert +fi + +# Install the local CA into the system/browser trust stores +mkcert -install + +# Generate certs for localhost +mkdir -p certs +mkcert -cert-file certs/localhost.pem -key-file certs/localhost-key.pem localhost 127.0.0.1 + +echo "Setup complete. Run deno/dev.sh and ddln_cli/dev.sh to start."