Set up Vitest for both server (Node + Supertest) and client (jsdom + React Testing Library). Extract Express app into app.js for testability. Add example tests covering bills validation, bills route CRUD, ThemeContext, and App nav rendering. Update CLAUDE.md with testing docs and requirement to write tests with features. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
13 lines
257 B
JavaScript
13 lines
257 B
JavaScript
require('dotenv').config();
|
|
const app = require('./app');
|
|
const db = require('./db');
|
|
|
|
const PORT = process.env.PORT || 3000;
|
|
|
|
(async () => {
|
|
await db.initialize();
|
|
app.listen(PORT, () => {
|
|
console.log(`Server running on port ${PORT}`);
|
|
});
|
|
})();
|