0edf4a789c
Extract Express app factory for testability, add Vitest/Supertest API smoke tests, root npm run check script, and deployment docs. Fix express-rate-limit IPv6 keyGenerator for feedback limiter. Co-authored-by: Cursor <cursoragent@cursor.com>
17 lines
485 B
TypeScript
17 lines
485 B
TypeScript
import dotenv from 'dotenv'
|
|
import { dirname, resolve } from 'node:path'
|
|
import { fileURLToPath } from 'node:url'
|
|
import { createApp } from './app.js'
|
|
|
|
const __dirname = dirname(fileURLToPath(import.meta.url))
|
|
|
|
dotenv.config({ path: resolve(__dirname, '../../.env') })
|
|
dotenv.config({ path: resolve(__dirname, '../.env') })
|
|
|
|
const app = createApp()
|
|
const PORT = process.env.PORT || 5000
|
|
|
|
app.listen(PORT, () => {
|
|
console.log(`[server] Server running on http://localhost:${PORT}`)
|
|
})
|