Permalink
Browse files

added another example

  • Loading branch information...
1 parent 5a0a420 commit c36bcee0e08bcb68e3b2b8551639954dff4c70d2 @truepattern truepattern committed May 1, 2012
Showing with 5 additions and 4 deletions.
  1. +5 −4 lib/aonx.js
View
@@ -12,7 +12,7 @@ var _ = require('underscore');
var config = require('./config');
// set up module variables
-var pkgname = '[aonx]';
+var pkgname = '[aonx] ';
//winston.default.transports.console.level = 'info';
winston.default.transports.console.colorize = true;
winston.default.transports.console.timestamp = true;
@@ -23,17 +23,18 @@ var app = express.createServer();
// configure the express server
exports.init = function(appconfig) {
- winston.info(pkgname + ' initializing...');
+ winston.info(pkgname + 'initializing...');
// if config is passed, over-ride the defaults with it
config=_.extend(config, appconfig);
- winston.debug(JSON.stringify(config));
+ winston.debug(pkgname + ' applying config:',JSON.stringify(config));
app.configure(function() {
// call favicon first
app.use(express.favicon());
app.use(express.logger('dev'));
if(config.server.jsonp) {
app.set('jsonp callback', config.server.jsonp);
+ winston.debug(pkgname + ' jsonp:',config.server.jsonp);
}
app.use(express.bodyParser());
@@ -57,7 +58,7 @@ exports.run = function(port) {
if(!port) {
port=config.server.port;
}
- winston.info(pkgname + ' run server on port:', port);
+ winston.info(pkgname + 'run server on port:', port);
app.listen(Number(port));
console.log("'%s' listening on port '%d' in '%s' mode",
config.app.title,

0 comments on commit c36bcee

Please sign in to comment.