var site= '../site'
var map= {
  localhost: site
 ,'127.0.0.1': site
}
extractHostFromHost= /([^:]+).*/

module.exports= function(req) {
  return map[req.headers.host.replace(extractHostFromHost,'$1')]
}

var site= '../site'
var map= {
  localhost: site
 ,'127.0.0.1': site
}

module.exports= function(req) {
  return map[req.malifi.utils.hostname()]
}

Use req.malifi.utils to get hostname
Use req.malifi.utils to get hostname
