Compare commits
3 Commits
buildy-bui
...
buildout-s
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
2b8dedab33 | ||
|
|
cbd6232b6a | ||
|
|
0fc5773f5d |
10
src/index.ts
10
src/index.ts
@@ -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'));
|
||||
@@ -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 = {
|
||||
|
||||
Reference in New Issue
Block a user