Skip to content

Commit 64fb854

Browse files
committed
move warning to app start
1 parent 9222ae6 commit 64fb854

File tree

1 file changed

+11
-1
lines changed

1 file changed

+11
-1
lines changed

server.js

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,5 +10,15 @@ const options = {
1010
};
1111

1212
app(options, () => {
13-
console.info("starting server on port: %d", options.port);
13+
console.info("starting server", options.port, options.redis);
14+
if (!options.port || !options.redis) {
15+
console.warn(`
16+
------------------------
17+
Missing env file or env vars:
18+
run this to fix it.
19+
cp .env.sample .env
20+
OR add MOCKBIN_PORT and MOCKBIN_REDIS to your env.
21+
------------------------
22+
`);
23+
}
1424
});

0 commit comments

Comments
 (0)