@sjcrh/proteinpaint-server 2.82.1 → 2.84.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -67,6 +67,15 @@ if (!('allow_env_overrides' in serverconfig) && serverconfig.debugmode) {
67
67
  serverconfig.allow_env_overrides = true
68
68
  }
69
69
 
70
+ //if jwt is enabled, check for JWT_SECRET environment variable
71
+ if (serverconfig.jwt) {
72
+ const jwtSecret = process.env.JWT_SECRET
73
+ if (!jwtSecret) {
74
+ throw `JWT_SECRET is not set as an environment variable.`
75
+ }
76
+ serverconfig.jwt.secret = jwtSecret
77
+ }
78
+
70
79
  if (!serverconfig.binpath) {
71
80
  const pkfile = process.argv.find(n => n.includes('/build'))
72
81
  if (pkfile) {