From 1bb8ab3056b23498be6fc60d0303eac8329d2e57 Mon Sep 17 00:00:00 2001 From: Zef Hemel Date: Wed, 4 May 2022 16:26:52 +0200 Subject: [PATCH] Tweaks --- package-lock.json | 2 +- packages/server/package.json | 4 ++-- packages/server/server.ts | 6 ++++-- packages/web/boot.ts | 2 +- 4 files changed, 8 insertions(+), 6 deletions(-) diff --git a/package-lock.json b/package-lock.json index 45d6c6b..8b0b76c 100644 --- a/package-lock.json +++ b/package-lock.json @@ -9995,7 +9995,7 @@ "yargs": "^17.3.1" }, "bin": { - "silverbullet": "dist/server.js" + "silverbullet": "dist/server/server.js" }, "devDependencies": { "@parcel/packager-raw-url": "2.3.2", diff --git a/packages/server/package.json b/packages/server/package.json index 3c58237..cfac526 100644 --- a/packages/server/package.json +++ b/packages/server/package.json @@ -7,10 +7,10 @@ "version": "0.0.1", "license": "MIT", "bin": { - "silverbullet": "./dist/server.js" + "silverbullet": "./dist/server/server.js" }, "scripts": { - "start": "nodemon -w dist --exec 'node --enable-source-maps dist/server/server.js --token abc ../../pages'", + "start": "nodemon -w dist --exec 'silverbullet ../../pages'", "test": "jest dist/test" }, "targets": { diff --git a/packages/server/server.ts b/packages/server/server.ts index b6552db..9dad792 100755 --- a/packages/server/server.ts +++ b/packages/server/server.ts @@ -1,4 +1,4 @@ -#!/usr/bin/env node +#!/usr/bin/env node --enable-source-maps import { nodeModulesDir } from "@plugos/plugos/environments/node_sandbox"; import { preloadModules } from "@silverbulletmd/common/preload_modules"; import { realpathSync } from "fs"; @@ -18,7 +18,9 @@ let args = yargs(hideBin(process.argv)) .parse(); if (!args._.length) { - console.error("Usage: silverbullet "); + console.error( + "Usage: silverbullet [--port 3000] [--token mysecrettoken] " + ); process.exit(1); } diff --git a/packages/web/boot.ts b/packages/web/boot.ts index 5601181..cb131ea 100644 --- a/packages/web/boot.ts +++ b/packages/web/boot.ts @@ -64,7 +64,7 @@ if (navigator.serviceWorker) { }); } else { console.log( - "No launching service worker (not present, maybe because not running on localhost or over SSL" + "No launching service worker (not present, maybe because not running on localhost or over SSL)" ); } // }