Last active
June 22, 2022 21:26
-
-
Save outsideris/750032 to your computer and use it in GitHub Desktop.
express vhost example
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var express = require('express'), | |
site1 = express.createServer(), | |
site2 = express.createServer(), | |
site_vhosts = [], | |
vhost; | |
site_vhosts.push(express.vhost('domain1.com', site1)); | |
site_vhosts.push(express.vhost('domain2.com', site2)); | |
vhost = express.createServer.apply(this, site_vhosts); | |
site1.listen(8080); | |
site2.listen(9090); | |
vhost.listen(80); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment