Skip to content

Commit

Permalink
force specify SALT usage
Browse files Browse the repository at this point in the history
  • Loading branch information
inetol committed Jul 31, 2024
1 parent cbc9b01 commit 9064264
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
2 changes: 1 addition & 1 deletion .env.example
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
## SERVER:
# Set log verbosity [2]:integer
# 0=error <- 1=warn <- 2=info <- 3=debug
# (0=error <- 1=warn <- 2=info <- 3=debug)
#LOGLEVEL=2

# Port for the server [4000]:integer
Expand Down
6 changes: 4 additions & 2 deletions src/server.ts
Original file line number Diff line number Diff line change
Expand Up @@ -34,8 +34,10 @@ export const server = (): typeof instance => {

// Check env
if (!env.salt) {
logger.warn('“SALT” variable unspecified, disabling...');
logger.warn('In the future you will be required to specify this option in your .env.');
logger.error('"SALT" value not specified, can\'t continue...');
logger.warn('Update your "SALT" environment value, see more at:');
logger.warn('https://github.com/jspaste/backend/raw/stable/.env.example');
process.exit(1);
}

instance.use('*', cors());
Expand Down

0 comments on commit 9064264

Please sign in to comment.