Add Vitest + n8n env var documentation
This commit is contained in:
parent
24fc85d911
commit
716fa45bf6
4 changed files with 1324 additions and 2 deletions
|
|
@ -25,3 +25,12 @@ POCKETBASE_ADMIN_PASSWORD=change-me
|
|||
# having the server re-authenticate on every cold start. Leave blank
|
||||
# to let the server log in with the email + password above.
|
||||
POCKETBASE_ADMIN_TOKEN=
|
||||
|
||||
# ── n8n (Purchase Order ingestion) ──────────────────────────────────────
|
||||
# Webhook URL the Next.js server forwards PO uploads to.
|
||||
# Server-only (no NEXT_PUBLIC_ prefix) — never exposed to the browser.
|
||||
N8N_PO_INGEST_URL=https://n8n.your-host.example/webhook/purchase-order-upload
|
||||
|
||||
# Shared secret n8n sends in the x-ingest-secret header when calling
|
||||
# /api/purchase-orders/ingest. Generate with: openssl rand -hex 32
|
||||
N8N_INGEST_SECRET=replace-with-output-of-openssl-rand-hex-32
|
||||
|
|
|
|||
1298
package-lock.json
generated
1298
package-lock.json
generated
File diff suppressed because it is too large
Load diff
|
|
@ -9,6 +9,8 @@
|
|||
"start": "next start -H 0.0.0.0 -p 3000",
|
||||
"lint": "next lint",
|
||||
"typecheck": "tsc --noEmit",
|
||||
"test": "vitest",
|
||||
"test:run": "vitest run",
|
||||
"postinstall": "node scripts/patch-next-dev-blocker.cjs"
|
||||
},
|
||||
"dependencies": {
|
||||
|
|
@ -43,6 +45,7 @@
|
|||
"eslint-config-next": "^16",
|
||||
"postcss": "^8.4.49",
|
||||
"tailwindcss": "^4.0.0",
|
||||
"typescript": "^5.7.2"
|
||||
"typescript": "^5.7.2",
|
||||
"vitest": "^2.1.9"
|
||||
}
|
||||
}
|
||||
|
|
|
|||
14
vitest.config.ts
Normal file
14
vitest.config.ts
Normal file
|
|
@ -0,0 +1,14 @@
|
|||
import { defineConfig } from "vitest/config";
|
||||
import path from "node:path";
|
||||
|
||||
export default defineConfig({
|
||||
resolve: {
|
||||
alias: {
|
||||
"@": path.resolve(__dirname, "./src"),
|
||||
},
|
||||
},
|
||||
test: {
|
||||
environment: "node",
|
||||
include: ["src/**/*.test.ts"],
|
||||
},
|
||||
});
|
||||
Loading…
Reference in a new issue