From fd1778f91972a2a0cf3daf1153b69756beff0d2d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?B=C3=A8r=20Kessels?= Date: Wed, 1 Oct 2025 14:54:36 +0200 Subject: [PATCH] docs: Document the usage and requirement for env.js to config dev --- .gitignore | 2 ++ README.md | 19 ++++++++++++++++++- 2 files changed, 20 insertions(+), 1 deletion(-) diff --git a/.gitignore b/.gitignore index 412fc6ab..63ac039b 100644 --- a/.gitignore +++ b/.gitignore @@ -6,4 +6,6 @@ node_modules index.html src/data/ +## Potential secrets +.env public/env.js diff --git a/README.md b/README.md index ea753182..e2834477 100644 --- a/README.md +++ b/README.md @@ -44,10 +44,27 @@ This will: ## Development on local machine Alternative to Docker is to run it locally on the machine. This requires yarn -and the right nodejs versions (TODO: what are these?) +and the right nodejs versions (TODO: what are these?). ``` yarn install +``` + +Before we start the dev server, we should create an env.js file that can be served by the dev server. + +Create a file `public/env.js` with content matching your own values. Refer to +`src/util/config.js` for the variables and their defaults. + +For example: +``` +var SERVER_URL = "http://localhost:8000"; +var EXTENSIONS_ROOT_URL = "http://localhost:8000"; +var EDU_ID = "https://mijn.test.eduid.nl"; +``` + +Then run the dev server: + +``` yarn dev ```