group code popup
This commit is contained in:
@@ -4,6 +4,7 @@ import { fileURLToPath } from 'node:url';
|
||||
import { offlineManifest } from './src/services/offline-manifest.js';
|
||||
import { setAppImageCopyright } from './src/services/copyright.js';
|
||||
import { config, ensureRuntimeDirectories } from './src/config.js';
|
||||
import { startCollaborationMaintenance } from './src/services/collaboration.js';
|
||||
import { openDatabase } from './src/database.js';
|
||||
import { createApiRouter } from './src/routes/api.js';
|
||||
import { notFoundHandler, errorHandler } from './src/middleware/errors.js';
|
||||
@@ -11,6 +12,7 @@ import { notFoundHandler, errorHandler } from './src/middleware/errors.js';
|
||||
const __dirname = path.dirname(fileURLToPath(import.meta.url));
|
||||
ensureRuntimeDirectories();
|
||||
const db = openDatabase();
|
||||
const stopCollaborationMaintenance = startCollaborationMaintenance(db);
|
||||
const app = express();
|
||||
const publicDirectory = path.join(__dirname, 'public');
|
||||
|
||||
@@ -54,6 +56,7 @@ const server = app.listen(config.port, config.host, () => {
|
||||
function shutdown(signal) {
|
||||
console.log(`${signal}: Server wird beendet.`);
|
||||
server.close(() => {
|
||||
stopCollaborationMaintenance();
|
||||
db.close();
|
||||
process.exit(0);
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user