Follow Best Practices
Deployment Best Practices
Security
Use public variables for transparency
# .env
VERSION_PUBLIC=1.0.0
NETWORK_PUBLIC=sepolia
SECRET_API_KEY=secret-here # Private
Reliability
- Health checks in your app
// Example health endpoint
app.get('/health', (req, res) => {
res.json({ status: 'healthy', version: process.env.VERSION_PUBLIC })
})
- Graceful shutdown
process.on('SIGTERM', async () => {
console.log('SIGTERM received, shutting down gracefully')
await cleanup()
process.exit(0)
})
- Logging
console.log('App started')
console.error('Error occurred:', error)
// Logs are visible via: eigenx app logs