diff --git a/dist/server/build.js b/dist/server/build.js index 941aa9811930..11af1e285162 100644 --- a/dist/server/build.js +++ b/dist/server/build.js @@ -89,7 +89,7 @@ if (_commander2.default.staticDir) { // The addon database service is disabled by default for now // It should be enabled with the --enable-db for dev server if (_commander2.default.enableDb) { - var dbPath = _commander2.default.dbPath || './.storybook/addon-db.json'; + var dbPath = _commander2.default.dbPath || _path2.default.resolve(configDir, 'addon-db.json'); _shelljs2.default.cp(dbPath, outputDir); } diff --git a/dist/server/index.js b/dist/server/index.js index 90cc81ac294d..c89b184d66f9 100755 --- a/dist/server/index.js +++ b/dist/server/index.js @@ -88,7 +88,7 @@ app.use((0, _middleware2.default)(configDir)); // The addon database service is disabled by default for now // It should be enabled with the --enable-db for dev server if (_commander2.default.enableDb) { - var dbPath = _commander2.default.dbPath || './.storybook/addon-db.json'; + var dbPath = _commander2.default.dbPath || _path2.default.resolve(configDir, 'addon-db.json'); app.use('/db', (0, _middleware4.default)(dbPath)); } diff --git a/src/server/build.js b/src/server/build.js index 6a5a5e8defab..b01e12aabc45 100644 --- a/src/server/build.js +++ b/src/server/build.js @@ -63,7 +63,7 @@ if (program.staticDir) { // The addon database service is disabled by default for now // It should be enabled with the --enable-db for dev server if (program.enableDb) { - const dbPath = program.dbPath || './.storybook/addon-db.json'; + const dbPath = program.dbPath || path.resolve(configDir, 'addon-db.json') shelljs.cp(dbPath, outputDir); } diff --git a/src/server/index.js b/src/server/index.js index 0637bab6c003..780bc2c9be69 100755 --- a/src/server/index.js +++ b/src/server/index.js @@ -72,7 +72,7 @@ app.use(storybook(configDir)); // The addon database service is disabled by default for now // It should be enabled with the --enable-db for dev server if (program.enableDb) { - const dbPath = program.dbPath || './.storybook/addon-db.json'; + const dbPath = program.dbPath || path.resolve(configDir, 'addon-db.json') app.use('/db', datastore(dbPath)); }