From 4a58ef4aade3728e0f45f62a88bea876e4222893 Mon Sep 17 00:00:00 2001 From: Dotta Date: Mon, 13 Apr 2026 10:40:43 -0500 Subject: [PATCH] Add service run commands for docs site --- README.md | 22 ++++++++++++++++++++++ package.json | 3 +++ 2 files changed, 25 insertions(+) diff --git a/README.md b/README.md index a924031..f46e5ad 100644 --- a/README.md +++ b/README.md @@ -14,6 +14,28 @@ npm run build npm run typecheck ``` +## Run as a service + +Use these commands when you want the docs site to run as a long-lived process: + +```bash +# Development preview service +npm run start:service +``` + +```bash +# Production-style service +npm run service +``` + +Both service commands bind to `0.0.0.0` and default to port `3000`. Set `HOST` or `PORT` to override them: + +```bash +PORT=4300 npm run service +``` + +Use `npm run build` before `npm run serve:service` if you want to split the build and run steps across separate deploy phases. + ## Structure - `start/`, `guides/`, `deploy/`, `adapters/`, `api/`, `cli/`, `specs/`: documentation content diff --git a/package.json b/package.json index a408f6c..af00727 100644 --- a/package.json +++ b/package.json @@ -5,8 +5,11 @@ "scripts": { "docusaurus": "docusaurus", "start": "docusaurus start", + "start:service": "sh -c 'BROWSER=none exec docusaurus start --host ${HOST:-0.0.0.0} --port ${PORT:-3000}'", "build": "docusaurus build", "serve": "docusaurus serve", + "serve:service": "sh -c 'exec docusaurus serve --host ${HOST:-0.0.0.0} --port ${PORT:-3000}'", + "service": "npm run build && npm run serve:service", "clear": "docusaurus clear", "deploy": "docusaurus deploy", "write-translations": "docusaurus write-translations",