Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

make backends loadable from npm packages

  • Loading branch information...
commit d63b6d4794218b1a5176593e23eba4a3e884e243 1 parent 679f222
@mrtazz mrtazz authored
Showing with 3 additions and 3 deletions.
  1. +3 −3 stats.js
View
6 stats.js
@@ -16,7 +16,7 @@ var backendEvents = new events.EventEmitter();
// Load and init the backend from the backends/ directory.
function loadBackend(config, name) {
- var backendmod = require("./backends/" + name);
+ var backendmod = require(name);
if (config.debug) {
util.log("Loading backend: " + name);
@@ -256,7 +256,7 @@ config.configFile(process.argv[2], function (config, oldConfig) {
}
} else {
// The default backend is graphite
- loadBackend(config, 'graphite');
+ loadBackend(config, './backends/graphite');
}
// Setup the flush timer
@@ -293,7 +293,7 @@ config.configFile(process.argv[2], function (config, oldConfig) {
}, keyFlushInterval);
}
-
+
;
}
Please sign in to comment.
Something went wrong with that request. Please try again.