Make stuff work with npm
This commit is contained in:
@@ -4,6 +4,7 @@ import yargs from "yargs";
|
||||
import { hideBin } from "yargs/helpers";
|
||||
import { ExpressServer } from "./api_server";
|
||||
import { nodeModulesDir } from "@plugos/plugos/environments/node_sandbox";
|
||||
import { preloadModules } from "@silverbulletmd/common/preload_modules";
|
||||
|
||||
let args = yargs(hideBin(process.argv))
|
||||
.option("port", {
|
||||
@@ -18,13 +19,15 @@ if (!args._.length) {
|
||||
}
|
||||
|
||||
const pagesPath = args._[0] as string;
|
||||
|
||||
const port = args.port;
|
||||
const webappDistDir = `${nodeModulesDir}/node_modules/@silverbulletmd/web/dist`;
|
||||
|
||||
// console.log("This is where the static files live", webappDistDir);
|
||||
|
||||
const expressServer = new ExpressServer(port, pagesPath, webappDistDir);
|
||||
const expressServer = new ExpressServer(
|
||||
port,
|
||||
pagesPath,
|
||||
webappDistDir,
|
||||
preloadModules
|
||||
);
|
||||
expressServer.start().catch((e) => {
|
||||
console.error(e);
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user