Skip to content

Commit

Permalink
move warning to app start
Browse files Browse the repository at this point in the history
  • Loading branch information
jackkav committed Jan 24, 2024
1 parent 9222ae6 commit 64fb854
Showing 1 changed file with 11 additions and 1 deletion.
12 changes: 11 additions & 1 deletion server.js
Original file line number Diff line number Diff line change
Expand Up @@ -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.
------------------------
`);
}
});

0 comments on commit 64fb854

Please sign in to comment.