Seperate servers

This commit is contained in:
Owen Schwartz
2024-12-07 22:07:13 -05:00
parent ef7723561e
commit 37f51bec9b
8 changed files with 214 additions and 189 deletions

View File

@@ -1,12 +0,0 @@
"use client";
export function NewtConfig() {
const config = `curl -fsSL https://get.docker.com -o get-docker.sh
sh get-docker.sh`;
return (
<pre className="mt-2 w-full rounded-md bg-slate-950 p-4 overflow-x-auto">
<code className="text-white whitespace-pre-wrap">{config}</code>
</pre>
);
}

View File

@@ -174,7 +174,13 @@ Endpoint = ${siteDefaults.endpoint}:${siteDefaults.listenPort}
PersistentKeepalive = 5`
: "";
const newtConfig = `newt --id ${siteDefaults?.newtId} --secret ${siteDefaults?.newtSecret}`;
// am I at http or https?
let proto = "http:";
if (typeof window !== "undefined") {
proto = window.location.protocol;
}
const newtConfig = `newt --id ${siteDefaults?.newtId} --secret ${siteDefaults?.newtSecret} --endpoint ${proto}//${siteDefaults?.endpoint}`;
return (
<>