create-wordjs 1.6.2 → 1.7.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +59 -0
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -6,6 +6,16 @@ Bootstrap a [WordJS](https://github.com/jaimemartinez/wordjs) site with one comm
|
|
|
6
6
|
npx create-wordjs my-site
|
|
7
7
|
```
|
|
8
8
|
|
|
9
|
+
It also **upgrades** an existing site and sets up **separate mode** (gateway + backend + frontend
|
|
10
|
+
on different machines) — see below:
|
|
11
|
+
|
|
12
|
+
```bash
|
|
13
|
+
npx create-wordjs upgrade [dir] # upgrade an existing install in place
|
|
14
|
+
npx create-wordjs gateway --host <ip> # machine 1: cluster gateway (CA + join tokens)
|
|
15
|
+
npx create-wordjs join backend --gateway <ip> --token <t> --ca-hash <fp> --advertise <ip>
|
|
16
|
+
npx create-wordjs join frontend --gateway <ip> --token <t> --ca-hash <fp> --advertise <ip>
|
|
17
|
+
```
|
|
18
|
+
|
|
9
19
|
That single command takes you from nothing to the browser install wizard:
|
|
10
20
|
|
|
11
21
|
1. Downloads the latest **pre-compiled** WordJS release ZIP from GitHub — no build step,
|
|
@@ -35,6 +45,55 @@ account, and you're in.
|
|
|
35
45
|
| `--no-start` | Scaffold and install dependencies only — start the server yourself later. |
|
|
36
46
|
| `-h`, `--help` | Show usage. |
|
|
37
47
|
|
|
48
|
+
Separate-mode options:
|
|
49
|
+
|
|
50
|
+
| Option | Description |
|
|
51
|
+
| --- | --- |
|
|
52
|
+
| `--host <ip/dns>` | (`gateway`) The address the other machines dial to reach this gateway. |
|
|
53
|
+
| `--gateway <ip/dns>` | (`join`) The gateway's address. |
|
|
54
|
+
| `--token <join-token>` | (`join`) A single-use token minted on the gateway. |
|
|
55
|
+
| `--ca-hash <sha256>` | (`join`) Pin the cluster-CA fingerprint the gateway printed (MITM guard). |
|
|
56
|
+
| `--advertise <ip/dns>` | (`join`) This node's routable address the gateway will proxy to. |
|
|
57
|
+
| `--enroll-port <port>` | (`join`) Gateway token-enrollment port (default `3101`). |
|
|
58
|
+
|
|
59
|
+
## Upgrade an existing site
|
|
60
|
+
|
|
61
|
+
```bash
|
|
62
|
+
cd .. && npx create-wordjs upgrade my-site # or run it from inside: npx create-wordjs upgrade .
|
|
63
|
+
```
|
|
64
|
+
|
|
65
|
+
Downloads the newest release and replaces the app code while **preserving your data**: the SQLite
|
|
66
|
+
database, `uploads/`, `wordjs-config.json`, gateway secrets and any user-installed plugins survive.
|
|
67
|
+
Restart the server afterwards (schema migrations run automatically on the next start).
|
|
68
|
+
|
|
69
|
+
## Separate mode (multi-machine)
|
|
70
|
+
|
|
71
|
+
Run the gateway, backend and frontend on **different machines**, joined into one mTLS cluster with
|
|
72
|
+
single-use join tokens (kubeadm/swarm style — no certificate is ever hand-copied). One command per
|
|
73
|
+
machine:
|
|
74
|
+
|
|
75
|
+
```bash
|
|
76
|
+
# Machine 1 — the gateway (mints the cluster CA and one token per role):
|
|
77
|
+
npx create-wordjs gateway --host 10.0.0.1
|
|
78
|
+
```
|
|
79
|
+
|
|
80
|
+
It downloads the release, initializes the cluster CA, starts the gateway, and prints the exact
|
|
81
|
+
**ready-to-paste** `join` commands for the other machines — token and CA fingerprint included:
|
|
82
|
+
|
|
83
|
+
```bash
|
|
84
|
+
# Machine 2 — backend (paste what the gateway printed):
|
|
85
|
+
npx create-wordjs join backend --gateway 10.0.0.1 --token <t> --ca-hash <fp> --advertise 10.0.0.2
|
|
86
|
+
|
|
87
|
+
# Machine 3 — frontend:
|
|
88
|
+
npx create-wordjs join frontend --gateway 10.0.0.1 --token <t> --ca-hash <fp> --advertise 10.0.0.3
|
|
89
|
+
```
|
|
90
|
+
|
|
91
|
+
Each `join` downloads the release, enrolls against the gateway (the token authorizes exactly one
|
|
92
|
+
certificate signing; it is burned afterwards), then starts the service, which registers with the
|
|
93
|
+
gateway over mTLS. Browse `https://<gateway>:3000` when all three are up. `join` machines need
|
|
94
|
+
`openssl` on the PATH. Full details, port matrix and the manual (source-checkout) procedure:
|
|
95
|
+
[documentation/separate-mode.md](https://github.com/jaimemartinez/wordjs/blob/main/documentation/separate-mode.md).
|
|
96
|
+
|
|
38
97
|
## Good to know
|
|
39
98
|
|
|
40
99
|
- **Self-signed HTTPS**: by default the site serves HTTPS on `:3000` with a locally generated
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "create-wordjs",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.7.0",
|
|
4
4
|
"description": "Create a WordJS site with one command — the self-hosted CMS where third-party plugins run in an OS-isolated process with per-capability permission grants. SSR/SEO out of the box, SQLite by default, no PHP.",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"author": "Jaime Martinez (https://github.com/jaimemartinez)",
|