3 Commits

Author SHA1 Message Date
KS Jannette
2b8dedab33 Edit code comments 2026-05-18 17:55:24 -04:00
KS Jannette
cbd6232b6a buildout server module 2026-05-18 17:54:11 -04:00
S Jannette
0fc5773f5d Merge pull request #2 from kjannette/buildy-buildy
Buildy buildy
2026-05-18 17:39:53 -04:00
2 changed files with 11 additions and 1 deletions

View File

@@ -6,3 +6,13 @@ const app = createApp();
const server = app.listen(PORT, () => {
console.log(`Server running on http://localhost:${PORT}`);
});
function shutdown(signal: string) {
console.log(`${signal} received — shutting down...`);
server.close(() => {
console.log('All connections closed. Exiting.');
process.exit(0);
});
}
process.on('SIGTERM', () => shutdown('SIGTERM'));
process.on('SIGINT', () => shutdown('SIGINT'));

View File

@@ -1,5 +1,5 @@
import { User, CreateUserDto, UpdateUserDto } from '../models/User';
// In-memory store — replace with DB client in a real app
const store: User[] = [];
let nextId = 1;
export const userRepository = {