mirror of
https://github.com/fdundjer/solana-sniper-bot.git
synced 2025-11-09 20:12:06 +10:00
14 lines
324 B
TypeScript
14 lines
324 B
TypeScript
import { Logger } from 'pino';
|
|
import dotenv from 'dotenv';
|
|
|
|
dotenv.config();
|
|
|
|
export const retrieveEnvVariable = (variableName: string, logger: Logger) => {
|
|
const variable = process.env[variableName] || '';
|
|
if (!variable) {
|
|
logger.error(`${variableName} is not set`);
|
|
process.exit(1);
|
|
}
|
|
return variable;
|
|
};
|