1
0
mirror of https://github.com/Unleash/unleash.git synced 2024-12-28 00:06:53 +01:00
unleash.unleash/unleash-server/lib/featureDb.js
Ivar Conradi Østhus c991fed69c #18 storing events when they are created.
Also introduced mockery to mock db-access. Here we probably
need better modularisation and/or better dependecy management
(injecting of deps?).
2014-10-23 12:04:24 +02:00

20 lines
451 B
JavaScript

var eventStore = require('./eventStore'),
eventType = require('./eventType'),
featuresMock = require('./featuresMock'),
logger = require('./logger'),
Promise = require('bluebird');
eventStore.on(eventType.featureCreated, function (event) {
logger.info('feature created event recieved', event);
}
);
function getFeatures() {
return Promise.resolve(featuresMock);
}
module.exports = {
getFeatures: getFeatures
};