From d3afe5d31c90a845b5e5f871ddf122f6198554a7 Mon Sep 17 00:00:00 2001 From: Sebastien Soudan Date: Mon, 27 Nov 2023 09:41:19 -0800 Subject: [PATCH] feat: serve:prod target --- README.md | 8 ++++++-- package.json | 5 +++-- 2 files changed, 9 insertions(+), 4 deletions(-) diff --git a/README.md b/README.md index b678ae4..62c038d 100644 --- a/README.md +++ b/README.md @@ -8,10 +8,14 @@ See https://ssoudan.github.io/web-nuts-rs/ for a live demo of a Bayesian regress Use the devcontainer to get a ready to use environment. +To run the app in development mode, run: ```bash npm i && npm run serve ``` -Open http://localhost:8080/ to see the app. - +To build the app for production, run: +```bash +npm i && npm run serve:prod +``` +Either way, you can now navigate to `http://localhost:8080` to view the app. diff --git a/package.json b/package.json index 6d3d055..32060b1 100644 --- a/package.json +++ b/package.json @@ -2,7 +2,8 @@ "scripts": { "release": "webpack -c webpack.config.js --mode production", "build": "webpack", - "serve": "webpack serve" + "serve": "webpack serve", + "serve:prod": "webpack serve --mode production" }, "devDependencies": { "@wasm-tool/wasm-pack-plugin": "1.7.0", @@ -17,4 +18,4 @@ "dependencies": { "wasm-pack": "^0.0.0" } -} +} \ No newline at end of file