Created
March 16, 2017 21:30
-
-
Save olegpolyakov/ab84f6c5a9700e6669955e16b24c3c05 to your computer and use it in GitHub Desktop.
Node app using vhost
This file contains 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
'use strict'; | |
const express = require('express'); | |
const vhost = require('vhost'); | |
const site = require('./site'); | |
const app = require('./app'); | |
const api = require('./api'); | |
const admin = require('./admin'); | |
const main = express(); | |
main.use(vhost('codedojo.ru', site)); | |
main.use(vhost('app.codedojo.ru', app)); | |
main.use(vhost('api.codedojo.ru', api)); | |
main.use(vhost('admin.codedojo.ru', admin)); | |
main.listen(port); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment