0
Fork 0
mirror of https://github.com/TryGhost/Ghost.git synced 2025-02-10 23:36:14 -05:00
ghost/core/server
Harry Wolff f16dc290b7 Improve bootstrap flow of a Ghost application
addresses #1789, #1364

- Moves ./core/server/loader -> ./core/bootstrap.
The bootstrap file is only accessed once during startup,
and it’s sole job is to ensure a config.js file exists
(creating one if it doesn’t) and then validates
the contents of the config file.

Since this is directly related to the initializing 
the application is is appropriate to have 
it in the ./core folder, named bootstrap as that
is what it does.

This also improves the dependency graph, as now
the bootstrap file require’s the ./core/server/config
module and is responsible for passing in the validated
config file.

Whereas before we had ./core/server/config
require’ing ./core/server/loader and running its
init code and then passing that value back to itself,
the flow is now more straight forward of
./core/bootstrap handling initialization and then
instatiation of config module

- Merges ./core/server/config/paths into 
./core/server/config
This flow was always confusing me to that some config
options were on the config object, and some were on
the paths object.

This change now incorporates all of the variables
previously defined in config/paths directly
into the config module, and in extension,
the config.js file.

This means that you now have the option of deciding
at startup where the content directory for ghost
should reside.

- broke out loader tests in config_spec to bootstrap_spec

- updated all relevant files to now use config().paths

- moved urlFor and urlForPost function into 
 ./server/config/url.js
2014-02-07 17:34:21 -05:00
..
api Improve bootstrap flow of a Ghost application 2014-02-07 17:34:21 -05:00
apps Improve bootstrap flow of a Ghost application 2014-02-07 17:34:21 -05:00
config Improve bootstrap flow of a Ghost application 2014-02-07 17:34:21 -05:00
controllers Improve bootstrap flow of a Ghost application 2014-02-07 17:34:21 -05:00
data Replace underscore with lodash. 2014-02-06 14:08:34 +00:00
helpers Improve bootstrap flow of a Ghost application 2014-02-07 17:34:21 -05:00
middleware Improve bootstrap flow of a Ghost application 2014-02-07 17:34:21 -05:00
models Replace underscore with lodash. 2014-02-06 14:08:34 +00:00
permissions Replace underscore with lodash. 2014-02-06 14:08:34 +00:00
routes Improve bootstrap flow of a Ghost application 2014-02-07 17:34:21 -05:00
storage Improve bootstrap flow of a Ghost application 2014-02-07 17:34:21 -05:00
views Merge pull request #2054 from ErisDS/issue-1995 2014-01-28 00:53:45 -08:00
api.js Shims for deleted (refactored away) files 2014-01-09 09:21:09 -06:00
bookshelf-session.js Merge branch '0.4-maintenance' 2014-01-26 16:11:02 +00:00
errorHandling.js Improve bootstrap flow of a Ghost application 2014-02-07 17:34:21 -05:00
filters.js Replace underscore with lodash. 2014-02-06 14:08:34 +00:00
index.js Improve bootstrap flow of a Ghost application 2014-02-07 17:34:21 -05:00
mail.js Replace underscore with lodash. 2014-02-06 14:08:34 +00:00
middleware.js Shims for deleted (refactored away) files 2014-01-09 09:21:09 -06:00
require-tree.js Remove unparam:true from jslint config in Gruntfile.js 2013-10-31 14:02:34 -04:00
update-check.js Replace underscore with lodash. 2014-02-06 14:08:34 +00:00