From 85884961e55ca0b21471a5d6ca1a64fb8d809e4e Mon Sep 17 00:00:00 2001 From: theory Date: Tue, 1 Apr 2014 03:05:23 -0600 Subject: [PATCH] appfog heroku --- init.js | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/init.js b/init.js index 705d5e2b..1a56ea8d 100644 --- a/init.js +++ b/init.js @@ -5,10 +5,7 @@ var LIVE = process.env.LIVE || (process.env.NODE_ENV === 'production') , web = require('coalesce') , opt = {}; opt.port = process.env.PORT || process.env.OPENSHIFT_NODEJS_POR || process.env.VCAP_APP_PORT || 8888; -process.env.domain = LIVE? 'http://gunjs.herokuapp.com' : - (function(){require('child_process').exec('ifconfig',function(e,r){ - console.log('on',process.env.domain='http://'+ r.match(/[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}/)[0] +':'+opt.port) - })})(); + opt.hook = { pre: (function(req,res){ //console.log("--------- "+req.flow+" : "+req.url.pathname +" ---------------");