This website requires JavaScript.
Explore
Help
Sign In
TryGhost
/
Ghost
Watch
1
Star
0
Fork
0
You've already forked Ghost
mirror of
https://github.com/TryGhost/Ghost.git
synced
2024-11-30 21:40:39 +03:00
Code
Issues
Projects
Releases
Wiki
Activity
4394580c1a
Ghost
/
ghost
/
core
/
index.js
7 lines
93 B
JavaScript
Raw
Normal View
History
Unescape
Escape
Configured New Relic to load earlier in the process refs https://github.com/TryGhost/DevOps/issues/68 - we want New Relic to be one of the first modules to load so it can instrument the rest of our code - previously this would not have been the case, and it would have missed out on instrumenting the config and logging code - this moves the require to be the first step in the process if the PRO_ENV env var is set
2023-08-30 12:30:04 +03:00
// Load New Relic
if
(
process
.
env
.
PRO
_ENV
)
{
require
(
'newrelic'
)
;
}
Added new, simpler, linear boot process Background: - Ghosts existing boot process is split across multiple files, has affordances for outdated ways of running Ghost and is generally non-linear making it nigh-impossible to follow - The web of dependencies that are loaded on boot are also impossible to unpick, which makes it really hard to decouple Ghost - With 4.0 we want to introduce a new, linear, simpler, clearer way to boot up Ghost to unlock decoupling Ghost into much smaller pieces This commit: - adds a new ghost.js file which switches between boot mode with `node index` or `node index old` so that if we find bugs we can work around them this week - Note: the old boot process will go away very soon, but ghost.js will remain as the interface between the command to start Ghost and the application code - reworks the database migration process into a standalone utility, so that the DB is handled as one simple step of the boot process, decoupled from everything else - is missing tests for this new db utility - leaves a lot of work to do around loading core code, services, express apps in a sensible order, as work to fix this would start to break the old boot process - doesn't use the new maintenance app because we aren't restarting the server here, instead we have the concept of a "core app" that starts in maintenance mode - need to think about how apps will be decoupled in the near future
2021-02-02 17:47:16 +03:00
require
(
'./ghost'
)
;
Reference in New Issue
Copy Permalink