Skip to content

📈 Open source, privacy-first web analytics — a cookie-less Google Analytics alternative with built-in error tracking and performance monitoring. Self-host it or use our cloud. Get started for free!

intialise DB before starting prod server

Blue Mousec52b3469fc1b
diff --git a/package.json b/package.json
index 639342163..40ad041e8 100644
--- a/package.json
+++ b/package.json
@@ -13,11 +13,12 @@
"build:selfhosted": "npm run prebuild && nest build selfhosted && mv apps/selfhosted/dist dist && npm run postbuild",
"postbuild": "cp .env dist/.env",
"format": "prettier --write \"apps/selfhosted/src/**/*.ts\" \"apps/production/src/**/*.ts\" \"test/**/*.ts\"",
+ "clickhouse:initialise": "node migrations/clickhouse/initialise_selfhosted.js",
"start": "cross-env NODE_ENV=development nest start",
"start:dev": "cross-env NODE_ENV=development nest start --watch",
"start:selfhosted": "cross-env NODE_ENV=development nest start selfhosted --watch",
"start:debug": "cross-env NODE_ENV=development nest start --debug --watch",
- "start:prod": "cross-env NODE_ENV=production node dist/main",
+ "start:prod": "npm run clickhouse:initialise && cross-env NODE_ENV=production node dist/main",
"lint": "eslint \"{apps/production/src,apps/selfhosted/src}/**/*.ts\"",
"lint:fix": "eslint \"{apps/production/src,apps/selfhosted/src}/**/*.ts\" --fix",
"test": "jest",