Thursday 31 January 2019

multiple express servers for subdomains or not?

Hi everyone,​So I want to run a website on a server which will have a few subdomains too - all in node. With apache I would just setup some express servers to certain ports and have domains redirect to them - but with an apache-less setup, how would I do this?I could do it all under one express server, with `vhost` and `express-subdomain` packages maybe - but then if a dev updates one subdomain's backend code, I'd need to restart the entire node app to get it to update (I use pm2 for managing node.js stuff, is there a feature for hot reload without performance drop?) and so this isn't ideal.However, if I use a different express server for each subdomain I'd need to someone link them all with one master express server - and will running multiple express servers not affect performance?​Thanks in advance for any help

Submitted January 31, 2019 at 07:59PM by SebyWeby19

No comments:

Post a Comment