Files
payload-mailing/dev/start-dev.js
Bas van den Aakster 8993d20526 Migrate dev server from MongoDB to SQLite
- Replace mongooseAdapter with sqliteAdapter in payload config
- Update database configuration to use file:./dev.db
- Remove MongoDB memory database helper and references
- Simplify start script by removing verbose logging and MongoDB messaging
- Fix email processing with immediate send support and proper queue handling
- Restructure app with route groups for frontend/admin separation
- Add dashboard and test pages for email management
- Update API routes for improved email processing and testing

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-09-14 19:48:45 +02:00

31 lines
734 B
JavaScript
Executable File

#!/usr/bin/env node
// Development startup script for PayloadCMS Mailing Plugin
// This ensures proper environment setup and provides helpful information
// Set development environment
process.env.NODE_ENV = process.env.NODE_ENV || 'development'
// Set default SQLite database for development
if (!process.env.DATABASE_URI) {
process.env.DATABASE_URI = 'file:./dev.db'
}
// Import and start Next.js
import('next/dist/cli/next-dev.js')
.then(({ nextDev }) => {
nextDev([])
})
.catch((error) => {
console.error('❌ Failed to start development server:', error)
process.exit(1)
})
// Handle graceful shutdown
process.on('SIGTERM', () => {
process.exit(0)
})
process.on('SIGINT', () => {
process.exit(0)
})