Fixes #204
This commit is contained in:
+9
-6
@@ -5,17 +5,20 @@ import { AssetBundle, AssetJson } from "../plugos/asset_bundle/bundle.ts";
|
||||
|
||||
export function serveCommand(options: any, folder: string) {
|
||||
const pagesPath = path.resolve(Deno.cwd(), folder);
|
||||
const hostname = options.hostname || "0.0.0.0";
|
||||
const hostname = options.hostname || "127.0.0.1";
|
||||
const port = options.port || 3000;
|
||||
|
||||
console.log(
|
||||
"Going to start Silver Bullet on",
|
||||
"Going to start Silver Bullet binding to",
|
||||
`${hostname}:${port}`,
|
||||
"serving pages from",
|
||||
pagesPath,
|
||||
"with db file",
|
||||
options.db,
|
||||
);
|
||||
console.log("Serving pages from", pagesPath);
|
||||
|
||||
if (hostname === "127.0.0.1") {
|
||||
console.log(
|
||||
`_Note:_ Silver Bullet will only be available locally (via http://localhost:${port}), to allow outside connections, pass --host 0.0.0.0 as a flag.`,
|
||||
);
|
||||
}
|
||||
|
||||
const httpServer = new HttpServer({
|
||||
hostname,
|
||||
|
||||
Reference in New Issue
Block a user