diff --git a/Dockerfile b/Dockerfile index 4031ac120b..68cf1faf70 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,4 +1,4 @@ -FROM nodesource/trusty:0.12 +FROM node:4.2.2 COPY . . diff --git a/README.md b/README.md index d9030d034d..66d60576ec 100644 --- a/README.md +++ b/README.md @@ -12,6 +12,15 @@ Known client implementations: - [unleash-client-java](https://github.com/finn-no/unleash-client-java) - [unleash-client-node](https://github.com/finn-no/unleash-client-node) +## Run with docker +We have set up docker-compose to start postgres and the unleash server together. This makes it really fast to start up +unleash locally without setting up a database or node. + +```bash +$ docker-compose build +$ docker-compose up +``` + ## Development ### Create a local unleash databases in postgres diff --git a/docker-compose.yml b/docker-compose.yml index 27cc6f5063..685f755d85 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -1,6 +1,6 @@ web: build: . - command: run db-migrate-and-start + command: npm run db-migrate-and-start ports: - "4242:4242" links: diff --git a/lib/logger.js b/lib/logger.js index 713ad2c3a5..bbdc7f7531 100644 --- a/lib/logger.js +++ b/lib/logger.js @@ -8,8 +8,10 @@ var logger = log4js.getLogger('unleash'); // TODO: make level configurable if (process.env.NODE_ENV === 'production') { logger.setLevel(log4js.levels.ERROR); +} else if (process.env.NODE_ENV === 'test') { + logger.setLevel(log4js.levels.ERROR); } else { logger.setLevel(log4js.levels.DEBUG); } -module.exports = logger; \ No newline at end of file +module.exports = logger; diff --git a/package.json b/package.json index 6111b2ea1f..29431a8445 100644 --- a/package.json +++ b/package.json @@ -41,7 +41,7 @@ "bluebird": "2.9.14", "body-parser": "1.12.2", "cookie-parser": "^1.3.3", - "db-migrate": "0.9.11", + "db-migrate": "0.9.23", "deep-diff": "^0.3.0", "errorhandler": "1.3.5", "express": "4.12.3", @@ -49,7 +49,7 @@ "ini": "1.3.3", "jsx-loader": "0.12.2", "jsxhint": "0.13.2", - "knex": "^0.7.3", + "knex": "^0.9.0", "lodash": "^3.5.0", "log4js": "0.6.22", "moment": "^2.11.2", @@ -66,7 +66,7 @@ "chai": "2.1.2", "coveralls": "^2.11.2", "istanbul": "^0.3.5", - "jest-cli": "0.4.15", + "jest-cli": "0.5.4", "jshint": "^2.6.0", "mocha": "^2.1.0", "mocha-lcov-reporter": "0.0.2", diff --git a/public/js/__tests__/components/feature/FeatureForm-test.js b/public/js/__tests__/components/feature/FeatureForm-test.js index 72c0a9b9f2..581d062fbd 100644 --- a/public/js/__tests__/components/feature/FeatureForm-test.js +++ b/public/js/__tests__/components/feature/FeatureForm-test.js @@ -17,7 +17,7 @@ describe("FeatureForm", function () { it("should render empty form", function() { Component = TestUtils .renderIntoDocument(); var name = Component.getDOMNode().querySelectorAll("input"); - expect(name[0].value).toEqual(undefined); + expect(name[0].value).toEqual(""); }); });