Guest User

Untitled

a guest
Sep 22nd, 2018
68
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.48 KB | None | 0 0
  1. var express = require("express"),
  2. port = process.env.PORT || 3000,
  3. app = express(),
  4. config = {domain: '*'};
  5.  
  6. app.use(express.errorHandler({ dumpExceptions: true, showStack: true }));
  7.  
  8. app.use(express.vhost('static.' + config.domain, require(__dirname + '/static.js')));
  9. app.use(express.vhost(config.domain, require(__dirname + '/web.js')));
  10.  
  11. app.listen(port, function() {
  12. console.log("Express server listening on " + port + " in " + process.env.NODE_ENV + " mode.");
  13. });
Add Comment
Please, Sign In to add comment