@nodegx/backend 0.1.2 → 0.1.4
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 +14 -0
- package/bin/nodegx-online.js +2 -1
- package/dist/cloud-bundle.cjs +2256 -1021
- package/dist/cloudflare-deploy.cjs +236 -106
- package/dist/package.json +1 -1
- package/dist/worker/worker.mjs +311 -308
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -10,6 +10,9 @@ charging you.
|
|
|
10
10
|
|
|
11
11
|
## Use
|
|
12
12
|
|
|
13
|
+
The guide, a section for every step the deploy prints: https://the-low-code-foundation.github.io/NodeGX/docs/deploy/cloudflare
|
|
14
|
+
|
|
15
|
+
|
|
13
16
|
```sh
|
|
14
17
|
npx @nodegx/backend sign-in cloudflare
|
|
15
18
|
npx @nodegx/backend deploy cloudflare ./my-app --no-bucket
|
|
@@ -42,6 +45,17 @@ The deployment's folder is `~/.nodegx/cloudflare/<name>/`. Its `deployment.json`
|
|
|
42
45
|
backend's admin credential, readable only by you. The credential is never uploaded; the deploy checks every file
|
|
43
46
|
before it uploads anything. The backend's dashboard is at `<address>/_admin`.
|
|
44
47
|
|
|
48
|
+
## Secrets and the dashboard
|
|
49
|
+
|
|
50
|
+
A secret a cloud function reads with a Secret node (an API key, a token) does not travel with a deploy. The ones set
|
|
51
|
+
on your computer, on the backend's Secrets page or in the app's `.env`, stay there. After its last step the deploy
|
|
52
|
+
lists the secrets the functions read and says which ones the backend on Cloudflare lacks.
|
|
53
|
+
|
|
54
|
+
Set them on the backend's own dashboard, at `<address>/_admin` (with the underscore), under **Settings → Secrets**.
|
|
55
|
+
They are not set in Cloudflare's dashboard. Sign in the first time with the `adminToken` from `deployment.json`
|
|
56
|
+
(on Windows, `C:\Users\<you>\.nodegx\cloudflare\<name>\deployment.json`). A redeploy keeps what you set.
|
|
57
|
+
More: https://the-low-code-foundation.github.io/NodeGX/docs/deploy/cloudflare#secrets
|
|
58
|
+
|
|
45
59
|
`npx @nodegx/backend domain find <words>` finds a name that is free and its price. `domain buy` buys one only when
|
|
46
60
|
you repeat its exact price back. Buying needs Cloudflare's own `cf` command signed in, because wrangler's sign-in
|
|
47
61
|
cannot buy names.
|
package/bin/nodegx-online.js
CHANGED
|
@@ -32,7 +32,8 @@ const HELP = `@nodegx/backend ${PKG.version} — put a NodeGX app online on your
|
|
|
32
32
|
npx @nodegx/backend domain find|check|buy|status|email …
|
|
33
33
|
Finds and buys the app's own name on your Cloudflare account, and sets up its email.
|
|
34
34
|
|
|
35
|
-
Every option of deploy: npx @nodegx/backend deploy cloudflare --help
|
|
35
|
+
Every option of deploy: npx @nodegx/backend deploy cloudflare --help
|
|
36
|
+
The guide, step by step: https://the-low-code-foundation.github.io/NodeGX/docs/deploy/cloudflare`;
|
|
36
37
|
|
|
37
38
|
/** A file inside an installed package, found the way Node finds the package (no `exports` map in the way). */
|
|
38
39
|
function packageFile(name, rel) {
|