units
Some checks failed
Deploy to Web Server flyer-crawler.projectium.com / deploy (push) Failing after 1m40s
Some checks failed
Deploy to Web Server flyer-crawler.projectium.com / deploy (push) Failing after 1m40s
This commit is contained in:
@@ -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();
|
||||
|
||||
|
||||
Reference in New Issue
Block a user