Added script for starting with env variables.

This commit is contained in:
Mike Cao 2020-09-30 22:56:23 -07:00
parent 5068ab12a9
commit 074f248bcd
2 changed files with 6 additions and 1 deletions

View File

@ -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 <mike@mikecao.com>",
"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",

4
scripts/start-env.js Normal file
View File

@ -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']);