gmail-to-exchange365
Version:
Complete Gmail to Exchange 365 migration tool with UI - Migrate emails, attachments, and folders seamlessly
33 lines (25 loc) • 915 B
text/typescript
import dotenv from "dotenv";
import app from "./server/app";
// Load environment variables
dotenv.config();
const PORT = process.env.PORT || 3000;
// Validate required environment variables
const requiredEnvVars = [
"GOOGLE_CLIENT_ID",
"GOOGLE_CLIENT_SECRET",
"MS_CLIENT_ID",
"MS_CLIENT_SECRET"
];
const missingVars = requiredEnvVars.filter(varName => !process.env[varName]);
if (missingVars.length > 0) {
console.error("❌ Missing required environment variables:");
missingVars.forEach(varName => console.error(` - ${varName}`));
console.error("\nPlease create a .env file with the required variables.");
console.error("See .env.example for reference.");
process.exit(1);
}
// Start server
app.listen(PORT, () => {
console.log(`🚀 Gmail → Exchange Migrator running on http://localhost:${PORT}`);
console.log(`📧 Ready to migrate emails!`);
});