Commit 3ca7bcf
fix: remove duplicate CheckInstallStep mount and .env hot-reload (#41)
Two related sources of duplicate-handler accumulation in the bootstrap:
1. CheckInstallStep was mounted twice: once inside
initializeControllers() and once unconditionally at the top level.
The top-level mount has to stay because the install wizard must be
reachable before MONGODB_URL is configured. Removed the inner mount
so each startup registers it exactly once.
2. fs.watchFile on .env called initializeControllers() on every save,
which re-ran .init(app) for ~60 route modules onto the same Express
app instance (Express has no clean route un-registration) and spun
another setInterval inside startInterval(). Removed the watcher;
nodemon already restarts on file changes in dev, and production
env changes require a process restart anyway.
After this change initializeControllers() is only invoked once, from
the MONGODB_URL startup gate.
Closes #41
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>1 parent 662715a commit 3ca7bcf
1 file changed
Lines changed: 0 additions & 6 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
140 | 140 | | |
141 | 141 | | |
142 | 142 | | |
143 | | - | |
144 | 143 | | |
145 | 144 | | |
146 | 145 | | |
| |||
195 | 194 | | |
196 | 195 | | |
197 | 196 | | |
198 | | - | |
199 | | - | |
200 | | - | |
201 | | - | |
202 | | - | |
203 | 197 | | |
204 | 198 | | |
205 | 199 | | |
| |||
0 commit comments