From eab13bc9d085a5f75d7714854676479896014aaf Mon Sep 17 00:00:00 2001 From: Matsuuu Date: Wed, 25 Mar 2020 14:41:20 +0200 Subject: [PATCH] Proposed fix --- app/README.md | 11 +++++++++++ app/package.json | 1 + 2 files changed, 12 insertions(+) diff --git a/app/README.md b/app/README.md index 9a43f94..6ef67bb 100644 --- a/app/README.md +++ b/app/README.md @@ -66,3 +66,14 @@ To build the project, run `npm run build` 1. Run `npm run build` in directory `app` so that the static files are generated in subdirectory `dist`. 2. Copy `dist` to a web server (e.g. Nginx) and let it serve. + + +### Custom environmental variables + +If you want to modify the `NODE_ENV` or `API_URL` variables of the app, you can easily modify them by calling the `npm run dev` and `npm run prod` scripts respectively. + +Example + +``` +npm run dev -- --env.NODE_ENV=foobar --env.API_URL=http://localhost:1234 +``` diff --git a/app/package.json b/app/package.json index 7e6a6da..337ff43 100644 --- a/app/package.json +++ b/app/package.json @@ -5,6 +5,7 @@ "main": "index.js", "scripts": { "build": "webpack --mode production --env.NODE_ENV=production --env.API_URL=https://dev.fevermap.net", + "prod": "webpack --mode production", "dev": "webpack --mode development" }, "author": "", -- GitLab