threadforge 0.2.1 → 0.2.3
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 +26 -31
- package/package.json +3 -2
package/README.md
CHANGED
|
@@ -22,9 +22,24 @@ Node.js runs on a single thread. Modern servers have 16, 32, 64+ cores. ThreadFo
|
|
|
22
22
|
|
|
23
23
|
## Quick Start
|
|
24
24
|
|
|
25
|
-
|
|
25
|
+
### Option 1: Install from npm (Recommended)
|
|
26
26
|
|
|
27
|
-
|
|
27
|
+
```bash
|
|
28
|
+
# Create and scaffold a new project
|
|
29
|
+
mkdir my-app && cd my-app
|
|
30
|
+
npm init -y
|
|
31
|
+
npm install threadforge
|
|
32
|
+
npx forge init . --source npm
|
|
33
|
+
npm install
|
|
34
|
+
|
|
35
|
+
# Start in development mode (hot reload)
|
|
36
|
+
npm run dev
|
|
37
|
+
|
|
38
|
+
# Start in production mode
|
|
39
|
+
npm run start
|
|
40
|
+
```
|
|
41
|
+
|
|
42
|
+
### Option 2: Local Development (ThreadForge contributors only)
|
|
28
43
|
|
|
29
44
|
```bash
|
|
30
45
|
# Clone and link ThreadForge locally
|
|
@@ -43,28 +58,7 @@ npm install
|
|
|
43
58
|
npm run dev
|
|
44
59
|
```
|
|
45
60
|
|
|
46
|
-
`forge init` is backend-only by default. Add static frontend scaffolding with `forge scaffold frontend` (or `forge init . --with-frontend`), or generate Vite + React with `forge scaffold frontend --react` (or `forge init . --with-react`).
|
|
47
|
-
|
|
48
|
-
### Option 2: Install from GitHub
|
|
49
|
-
|
|
50
|
-
```bash
|
|
51
|
-
# Scaffold a new project
|
|
52
|
-
npx github:ChrisBland/threadforge init my-app
|
|
53
|
-
cd my-app
|
|
54
|
-
npm install
|
|
55
|
-
|
|
56
|
-
# Start in development mode (hot reload)
|
|
57
|
-
npm run dev
|
|
58
|
-
|
|
59
|
-
# Start in production mode
|
|
60
|
-
npm run start
|
|
61
|
-
```
|
|
62
|
-
|
|
63
|
-
If `npx github:ChrisBland/threadforge ...` fails with npm cache permission errors (`EPERM` on `~/.npm/_cacache`), use a writable cache directory for the command:
|
|
64
|
-
|
|
65
|
-
```bash
|
|
66
|
-
NPM_CONFIG_CACHE=/tmp/threadforge-npm-cache npx github:ChrisBland/threadforge init my-app
|
|
67
|
-
```
|
|
61
|
+
`forge init` is backend-only by default. Add static frontend scaffolding with `npx forge scaffold frontend` (or `npx forge init . --with-frontend`), or generate Vite + React with `npx forge scaffold frontend --react` (or `npx forge init . --with-react`).
|
|
68
62
|
|
|
69
63
|
Create `forge.config.js`:
|
|
70
64
|
|
|
@@ -129,10 +123,11 @@ For multi-site projects (multiple apps/domains with per-app services/frontends):
|
|
|
129
123
|
|
|
130
124
|
```bash
|
|
131
125
|
mkdir platform-app && cd platform-app
|
|
132
|
-
npm
|
|
133
|
-
|
|
134
|
-
forge platform
|
|
135
|
-
forge platform add
|
|
126
|
+
npm init -y
|
|
127
|
+
npm install threadforge
|
|
128
|
+
npx forge platform init
|
|
129
|
+
npx forge platform add sitea
|
|
130
|
+
npx forge platform add siteb
|
|
136
131
|
|
|
137
132
|
# then edit forge.platform.js:
|
|
138
133
|
# - add platform.apps.<appId> with domains/services/frontend
|
|
@@ -146,9 +141,9 @@ forge platform add siteb
|
|
|
146
141
|
# cd ../../siteb/web && npm install
|
|
147
142
|
# cd ../../../
|
|
148
143
|
|
|
149
|
-
forge build
|
|
150
|
-
forge platform generate
|
|
151
|
-
forge platform start
|
|
144
|
+
npx forge build
|
|
145
|
+
npx forge platform generate
|
|
146
|
+
npx forge platform start
|
|
152
147
|
```
|
|
153
148
|
|
|
154
149
|
See:
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "threadforge",
|
|
3
|
-
"version": "0.2.
|
|
3
|
+
"version": "0.2.3",
|
|
4
4
|
"description": "Multi-threaded Node.js service runtime framework",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"bin": {
|
|
@@ -114,7 +114,8 @@
|
|
|
114
114
|
},
|
|
115
115
|
"dependencies": {
|
|
116
116
|
"@oclif/core": "^4.8.0",
|
|
117
|
-
"@oclif/plugin-help": "^6.2.37"
|
|
117
|
+
"@oclif/plugin-help": "^6.2.37",
|
|
118
|
+
"threadforge": "github:ChrisBland/threadforge"
|
|
118
119
|
},
|
|
119
120
|
"oclif": {
|
|
120
121
|
"bin": "forge",
|