import 'dotenv/config'
import app from './app'
import { validateEnv } from './lib/config'
import logger from './lib/logger'

validateEnv()

const PORT = Number(process.env.PORT) || 3000

app.listen(PORT, '::', () => {
  logger.info(`Server running on http://[::]:${PORT}`)
})
