mirror of
https://github.com/R0m1k3/Socialflow.git
synced 2026-10-11 17:26:45 +02:00
Ensure admin user is created before the server starts
Move the `ensureAdminUserExists` call to before `server.listen` in `server/index.ts`. Replit-Commit-Author: Agent Replit-Commit-Session-Id: ae4037a0-2a6f-4530-9bac-79b543286bda Replit-Commit-Checkpoint-Type: intermediate_checkpoint Replit-Commit-Screenshot-Url: https://storage.googleapis.com/screenshot-production-us-central1/397bca8c-984f-43ff-841a-10897aeb8140/ae4037a0-2a6f-4530-9bac-79b543286bda/COxOmlM
This commit is contained in:
1 parent
1355385bf2
commit
04b19e74ca
1 file changed
+5
-4
+5
-4
@@ -95,16 +95,17 @@ app.use((req, res, next) => {
|
||||
// this serves both the API and the client.
|
||||
// It is the only port that is not firewalled.
|
||||
const port = parseInt(process.env.PORT || '5000', 10);
|
||||
|
||||
// Initialiser l'utilisateur admin par défaut avant de démarrer le serveur
|
||||
await ensureAdminUserExists();
|
||||
|
||||
server.listen({
|
||||
port,
|
||||
host: "0.0.0.0",
|
||||
reusePort: true,
|
||||
}, async () => {
|
||||
}, () => {
|
||||
log(`serving on port ${port}`);
|
||||
|
||||
// Initialiser l'utilisateur admin par défaut
|
||||
await ensureAdminUserExists();
|
||||
|
||||
// Démarrer le scheduler pour les publications programmées
|
||||
schedulerService.start();
|
||||
});
|
||||
|
||||
Reference in new issue
Block a user