release: WRNexusJS 0.8.0
This commit is contained in:
@@ -8,12 +8,13 @@
|
||||
* the supervisor delivers live reload of edited server code.
|
||||
*/
|
||||
|
||||
import { readFileSync } from "node:fs";
|
||||
import { dirname } from "node:path";
|
||||
import type { Mode } from "@wrnexus/core";
|
||||
import { findStyleEntry, headToString, loadAppConfig, renderFontHead } from "@wrnexus/styles";
|
||||
import { startServer } from "./index.ts";
|
||||
|
||||
const [appDir, portStr, modeStr, hostname, hmrStr] = process.argv.slice(2);
|
||||
const [appDir, portStr, modeStr, hostname, hmrStr, certFile, keyFile] = process.argv.slice(2);
|
||||
|
||||
const mode = (modeStr as Mode) || "development";
|
||||
|
||||
@@ -38,6 +39,10 @@ const server = await startServer({
|
||||
|
||||
port,
|
||||
hostname,
|
||||
tls:
|
||||
certFile && keyFile
|
||||
? { cert: readFileSync(certFile, "utf8"), key: readFileSync(keyFile, "utf8") }
|
||||
: undefined,
|
||||
mode,
|
||||
hmr: hmrStr === undefined ? undefined : hmrStr === "true",
|
||||
|
||||
|
||||
Reference in New Issue
Block a user