mirror of
https://github.com/amark/gun.git
synced 2025-03-30 15:08:33 +00:00
appfog heroku
This commit is contained in:
parent
ebffba676f
commit
85884961e5
5
init.js
5
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 +" ---------------");
|
||||
|
Loading…
x
Reference in New Issue
Block a user