mirror of
https://github.com/fdundjer/solana-sniper-bot.git
synced 2025-11-19 03:01:19 +10:00
13 lines
322 B
TypeScript
13 lines
322 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;
|
|
}
|