From 074f248bcdbddb1c7a1b1fa3dbbdc05149cde670 Mon Sep 17 00:00:00 2001 From: Mike Cao Date: Wed, 30 Sep 2020 22:56:23 -0700 Subject: [PATCH] Added script for starting with env variables. --- package.json | 3 ++- scripts/start-env.js | 4 ++++ 2 files changed, 6 insertions(+), 1 deletion(-) create mode 100644 scripts/start-env.js diff --git a/package.json b/package.json index 5aeaf30e..fe31a1f5 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "umami", - "version": "0.66.0", + "version": "0.67.0", "description": "A simple, fast, website analytics alternative to Google Analytics. ", "author": "Mike Cao ", "license": "MIT", @@ -13,6 +13,7 @@ "dev": "next dev", "build": "npm-run-all build-tracker build-lang build-geo build-db build-app", "start": "next start", + "start-env": "node scripts/start-env.js", "build-app": "next build", "build-tracker": "rollup -c rollup.tracker.config.js", "build-db": "npm-run-all copy-db-schema build-db-client", diff --git a/scripts/start-env.js b/scripts/start-env.js new file mode 100644 index 00000000..bfaf1330 --- /dev/null +++ b/scripts/start-env.js @@ -0,0 +1,4 @@ +require('dotenv').config(); +const cli = require('next/dist/cli/next-start'); + +cli.nextStart(['-p', process.env.PORT || 3000, '-H', process.env.HOSTNAME || '0.0.0.0']);