Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- app.get('*', function(req, res, next){
- if(req.headers.host == 'sub.example.com') { //if it's a sub-domain
- app.use('/', sub_routes);
- }else{
- app.use('/', routes);
- }
- next();
- });
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement