Permalink
Browse files

Merge branch 'master' of github.com:mde/geddy

* 'master' of github.com:mde/geddy:
  Update README.md
  Update README.md
  Version 0.3.2
  Fixes for metrics workflow.
  • Loading branch information...
2 parents c1495f3 + 1af68a6 commit 6acc741dfff3bea312ea407f60fea86dc3d463b0 Techwraith committed Feb 8, 2012
Showing with 22 additions and 11 deletions.
  1. +1 −0 Jakefile
  2. +2 −2 README.md
  3. +2 −0 lib/base_config.js
  4. +11 −8 lib/cluster/master.js
  5. +1 −1 package.json
  6. +5 −0 templates/base/environment.js
View
@@ -58,6 +58,7 @@ namespace('gen', function () {
, 'mkdir -p ./' + dir + '/app/controllers'
, 'mkdir -p ./' + dir + '/lib'
, 'mkdir -p ./' + dir + '/log'
+ , 'mkdir -p ./' + dir + '/node_modules'
, 'cp -r ' + templateDir + '/views ' + dir + '/app/'
, 'cp -r ' + templateDir + '/public ' + dir
, 'cp ' + templateDir + '/router.js ' + dir + '/config/'
View
@@ -16,7 +16,7 @@ but still let you get under the hood and tinker if you want.
* Easy resource-based routing
* App and resource generators
* Content-negotiation
- * Session support (in-memory, cookie, CouchDB)
+ * Session support (in-memory, cookie)
* Templating (EJS), partials support
* Fully non-blocking
@@ -26,7 +26,7 @@ Apache License, Version 2
### Prerequisites
-Geddy requires version 0.4.x of Node.js, and the
+Geddy requires version 0.4.x of Node.js or higher, and the
[Jake](https://github.com/mde/jake) JavaScript build-tool.
### Installing
View
@@ -33,6 +33,8 @@
}
// Key for when using Cookie session-store
, cookieSessionKey: 'sdata'
+// Should be an object literal with config opts if used
+, metrics: null
};
module.exports = config;
View
@@ -136,15 +136,18 @@ Master.prototype = new (function () {
rotateAndInitByType();
}
, _startMetrics = function (next) {
- var self = this;
- if (self.config.metrics) {
+ var metrics
+ , port;
+ if (this.config.metrics) {
try {
- var metrics = require(process.cwd() + '/node_modules/metrics')
- , port = self.config.metrics.port || 9091;
- self.stdoutLog.info("Metrics server started on port " + port);
- self.metricsServer = new metrics.Server(port);
- } catch(e) {
- throw e;//new Error("To turn on Metrics, do `npm install metrics`. Couldn't find it at: " + process.cwd() + "/node_modules/metrics");
+ port = this.config.metrics.port;
+ metrics = require(process.cwd() + '/node_modules/metrics');
+ this.stdoutLog.info("Metrics server started on port " + port);
+ this.metricsServer = new metrics.Server(port);
+ }
+ catch(e) {
+ throw new Error("To turn on Metrics, do `npm install metrics`. " +
+ "Couldn't find it at: " + process.cwd() + "/node_modules/metrics");
}
}
next();
View
@@ -7,7 +7,7 @@
"REST",
"MVC"
],
- "version": "0.3.1",
+ "version": "0.3.2",
"author": "Matthew Eernisse <mde@fleegix.org> (http://fleegix.org)",
"dependencies": {
"jake": "0.2.x"
@@ -1,4 +1,9 @@
var config = {
+ /*
+ metrics: {
+ port: 4001
+ }
+ */
};
module.exports = config;

0 comments on commit 6acc741

Please sign in to comment.