mirror of
https://github.com/xtr-dev/payload-mailing.git
synced 2025-12-10 08:13:23 +00:00
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>
This commit is contained in:
@@ -3,26 +3,14 @@
|
||||
// Development startup script for PayloadCMS Mailing Plugin
|
||||
// This ensures proper environment setup and provides helpful information
|
||||
|
||||
console.log('🚀 PayloadCMS Mailing Plugin - Development Mode')
|
||||
console.log('=' .repeat(50))
|
||||
|
||||
// Set development environment
|
||||
process.env.NODE_ENV = process.env.NODE_ENV || 'development'
|
||||
|
||||
// Enable in-memory MongoDB by default for development
|
||||
// Set default SQLite database for development
|
||||
if (!process.env.DATABASE_URI) {
|
||||
process.env.USE_MEMORY_DB = 'true'
|
||||
console.log('📦 Using in-memory MongoDB (no installation required)')
|
||||
} else {
|
||||
console.log(`🔗 Using external MongoDB: ${process.env.DATABASE_URI}`)
|
||||
process.env.DATABASE_URI = 'file:./dev.db'
|
||||
}
|
||||
|
||||
console.log('')
|
||||
console.log('🔧 Starting development server...')
|
||||
console.log('📧 Mailing plugin configured with test transport')
|
||||
console.log('🎯 Test interface will be available at: /mailing-test')
|
||||
console.log('')
|
||||
|
||||
// Import and start Next.js
|
||||
import('next/dist/cli/next-dev.js')
|
||||
.then(({ nextDev }) => {
|
||||
@@ -35,11 +23,9 @@ import('next/dist/cli/next-dev.js')
|
||||
|
||||
// Handle graceful shutdown
|
||||
process.on('SIGTERM', () => {
|
||||
console.log('\n🛑 Shutting down development server...')
|
||||
process.exit(0)
|
||||
})
|
||||
|
||||
process.on('SIGINT', () => {
|
||||
console.log('\n🛑 Shutting down development server...')
|
||||
process.exit(0)
|
||||
})
|
||||
Reference in New Issue
Block a user