Skip to content

Commit 28ae4e1

Browse files
author
Marc Ghorayeb
committed
feat(storage): allow storageless publishers
1 parent 91027cd commit 28ae4e1

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

storage.js

+3-1
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ function Storage(config) {
88
this.adapters = [];
99
}
1010

11-
Storage.adapters = [ 'memory', 'mongodb', 'fs' ];
11+
Storage.adapters = [ 'none', 'memory', 'mongodb', 'fs' ];
1212

1313
Storage.isAdapterAvailable = function (adapter) {
1414
return adapter && (Storage.adapters.indexOf(adapter.toLowerCase()) !== -1);
@@ -25,6 +25,8 @@ Storage.prototype.initAdapters = function (done) {
2525
Storage.prototype.initAdapter = function (config, adapterName, done) {
2626
if (!Storage.isAdapterAvailable(adapterName)) return done(new Error('Missing storage adapter'));
2727

28+
if (adapterName === 'none') return done();
29+
2830
var Adapter = require(format('./storage/%s.js', adapterName));
2931
var adapter = new Adapter(config);
3032
var self = this;

0 commit comments

Comments
 (0)