Skip to content

Commit

Permalink
fix(local): allow limited customization of local installation
Browse files Browse the repository at this point in the history
closes #206
- allow url, process name, and the db info to be supplied via the command line
  • Loading branch information
acburdine committed Jun 13, 2017
1 parent def523f commit cf21285
Showing 1 changed file with 9 additions and 4 deletions.
13 changes: 9 additions & 4 deletions lib/commands/setup.js
Original file line number Diff line number Diff line change
Expand Up @@ -21,11 +21,16 @@ module.exports.execute = function execute(options) {
};

if (options.local) {
options.url = 'http://localhost:2368/';
options.pname = 'ghost-local';
options.url = options.url || 'http://localhost:2368/';
options.pname = options.pname || 'ghost-local';
options.process = 'local';
options.db = 'sqlite3';
options.dbpath = path.join(process.cwd(), 'content/data/ghost-local.db');

// If the user's already specified a db client, then we won't override it.
if (!options.db) {
options.db = options.db || 'sqlite3';
options.dbpath = path.join(process.cwd(), 'content/data/ghost-local.db');
}

context.start = true;

// In the case that the user runs `ghost setup --local`, we want to make
Expand Down

0 comments on commit cf21285

Please sign in to comment.