diff --git a/packages/unleash-api/migrator.js b/packages/unleash-api/migrator.js index 5d21f69a32..d51e2564b0 100644 --- a/packages/unleash-api/migrator.js +++ b/packages/unleash-api/migrator.js @@ -8,7 +8,7 @@ function findUnleashApiRoot () { return path.dirname(require.resolve('unleash-api/package.json')); } catch (e) {} try { - return path.dirname(require.resolve('../unleash-api')); + return path.dirname(require.resolve('../unleash-api/package.json')); } catch (e) {} return process.cwd(); } diff --git a/packages/unleash-server/unleash.js b/packages/unleash-server/bin/unleash.js similarity index 80% rename from packages/unleash-server/unleash.js rename to packages/unleash-server/bin/unleash.js index aa11eaed61..2a8305259c 100755 --- a/packages/unleash-server/unleash.js +++ b/packages/unleash-server/bin/unleash.js @@ -5,11 +5,11 @@ process.env.NODE_ENV = 'production'; const program = require('commander'); -const unleash = require('./server.js'); +const unleash = require('../server.js'); program - .option('-p, --port ', 'The full port you want to start unleash on.') + .option('-p, --port ', 'The port you want to start unleash on') .option('-d, --databaseUri ', 'The full databaseUri to connect to, including username and password') .parse(process.argv); diff --git a/packages/unleash-server/package.json b/packages/unleash-server/package.json index 56a4e37de5..05dad2a26e 100644 --- a/packages/unleash-server/package.json +++ b/packages/unleash-server/package.json @@ -25,7 +25,7 @@ }, "main": "./server.js", "bin": { - "unleash": "./unleash.js" + "unleash": "./bin/unleash.js" }, "scripts": { "db-migrate-and-start": "npm run db-migrate && npm run start",