Skip to content

Commit b98ce9b

Browse files
authored
Merge pull request #146 from chornos13/master
add: troubleshoot error when .env doesn't exist in root project
2 parents 60750d9 + 4d1a1f4 commit b98ce9b

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

src/bin/server.ts

+6
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,11 @@
11
#!/usr/bin/env node
2+
import fs from 'fs'
23

4+
if (!fs.existsSync('./.env')) {
5+
throw new Error(
6+
'Missing env!!!\nCopy/rename ".env.example" root directory to ".env"'
7+
)
8+
}
39
/**
410
* Module dependencies.
511
*/

0 commit comments

Comments
 (0)