units
Some checks failed
Deploy to Web Server flyer-crawler.projectium.com / deploy (push) Failing after 1m40s

This commit is contained in:
2025-11-22 10:37:09 -08:00
parent f64eb42233
commit 4c51bd5ba2

View File

@@ -12,8 +12,13 @@ import userRouter from './src/routes/user';
import adminRouter from './src/routes/admin';
import aiRouter from './src/routes/ai';
// Load environment variables from a .env file at the root of your project
dotenv.config();
// Conditionally load environment variables based on the environment.
// When running tests, `NODE_ENV` is automatically set to 'test' by Vitest.
if (process.env.NODE_ENV === 'test') {
dotenv.config({ path: '.env.test' });
} else {
dotenv.config(); // Load the default .env file for development/production
}
const app = express();