diff --git a/app/README.md b/app/README.md index 9a43f94dd55efc2d29e8fa632eb22a3d8e49de2c..6ef67bb91748359cfcffb0d24ad8d74cd6652241 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 7e6a6da824bbed4e5754328f8bd0cb0124c7c158..337ff43682c39e0d4d854d25e2070d9f7743b0f4 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": "",