mirror of
https://github.com/paperclipai/docs.git
synced 2026-11-07 06:15:59 -10:00
Add service run commands for docs site
This commit is contained in:
1 parent
901453a5fa
commit
4a58ef4aad
2 files changed
+25
No files matched your search
@@ -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
|
||||
|
||||
@@ -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",
|
||||
|
||||
Reference in new issue
Block a user