Error when using vhost in express

My code for server.js is:

var express = require('express');

var ENV = process.env['NODE_ENV'] || 'development';
var config = require('./config')[ENV];
  // The express server to listen for both the clients
var main = express();

// Main application
main.use(express.vhost('vypics', require('./web_app/app').app))

// Example sub domain
main.use(express.vhost('android.vypics',require('./android_app/app').app));

main.listen(3000);
console.log('started on 3000');

when I am running node server.js I am getting the following error.

/Users/saransh2012/Developer/vypics/node_modules/express/node_modules/connect/lib/middleware/vhost.js:30
  if (!server) throw new Error('vhost server required');
                     ^
Error: vhost server required
    at Function.vhost (/Users/saransh2012/Developer/vypics/node_modules/express/node_modules/connect/lib/middleware/vhost.js:30:22)
    at Object.<anonymous> (/Users/saransh2012/Developer/vypics/server.js:8:18)
    at Module._compile (module.js:456:26)
    at Object.Module._extensions..js (module.js:474:10)
    at Module.load (module.js:356:32)
    at Function.Module._load (module.js:312:12)
    at Function.Module.runMain (module.js:497:10)

    at startup (node.js:119:16)
    at node.js:901:3

Please help.....What Am i Doing wrong.

You'll get that error when the second argument to express.vhost is falsy.

My guess would be that either require('./web_app/app').app or require('./android_app/app').app (or both) is undefined.

The error was in the require('.web_app/app').app part as mentioned by robertklep.It was a very silly error on my part as i forgot to write the export for the app. Sorry guys for such a silly error but sometimes those are the one very difficult to see.