create-snagset 0.1.4 → 0.1.5
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/dist/template/README.md +4 -1
- package/dist/template/vercel.json +10 -5
- package/package.json +1 -1
package/dist/template/README.md
CHANGED
|
@@ -72,7 +72,10 @@ dashboard says so.
|
|
|
72
72
|
|
|
73
73
|
## Deploy it
|
|
74
74
|
|
|
75
|
-
**Vercel.** `vercel.json` and `api/index.js` are here already.
|
|
75
|
+
**Vercel.** `vercel.json` and `api/index.js` are here already. The
|
|
76
|
+
`rewrites` entry is load-bearing: without it Vercel's filesystem router serves
|
|
77
|
+
only `/api/index` and 404s `/`, `/snag.js` and the cron's own path. Keep the
|
|
78
|
+
file free of comment keys — Vercel's schema rejects them. Add a Postgres
|
|
76
79
|
from the marketplace, set `SNAGSET_SECRET_KEY` (required on serverless — the
|
|
77
80
|
filesystem is ephemeral, so a generated key would differ per instance and
|
|
78
81
|
nothing would decrypt), and add a release command:
|
|
@@ -1,10 +1,15 @@
|
|
|
1
1
|
{
|
|
2
2
|
"$schema": "https://openapi.vercel.sh/vercel.json",
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
3
|
+
"rewrites": [
|
|
4
|
+
{
|
|
5
|
+
"source": "/(.*)",
|
|
6
|
+
"destination": "/api/index"
|
|
7
|
+
}
|
|
8
|
+
],
|
|
7
9
|
"crons": [
|
|
8
|
-
{
|
|
10
|
+
{
|
|
11
|
+
"path": "/api/jobs/run",
|
|
12
|
+
"schedule": "* * * * *"
|
|
13
|
+
}
|
|
9
14
|
]
|
|
10
15
|
}
|