From 64fb8543898d319a25f26e7f39c6115fa8287e51 Mon Sep 17 00:00:00 2001 From: jackkav Date: Wed, 24 Jan 2024 11:36:31 +0100 Subject: [PATCH] move warning to app start --- server.js | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/server.js b/server.js index 56be6f6f..c8ec417e 100644 --- a/server.js +++ b/server.js @@ -10,5 +10,15 @@ const options = { }; app(options, () => { - console.info("starting server on port: %d", options.port); + console.info("starting server", options.port, options.redis); + if (!options.port || !options.redis) { + console.warn(` + ------------------------ + Missing env file or env vars: + run this to fix it. + cp .env.sample .env + OR add MOCKBIN_PORT and MOCKBIN_REDIS to your env. + ------------------------ + `); + } });