I'm starting to use node.js and am looking for the best way to host multiple node.js demos (>20) on one server. My only requirement is that an error in one not take down the rest.
So far I've looked at:
- Multiple node.js instances - this works but the overhead is quite high with a large number of demos processes
- Express front end routing to individual demo files - no overhead but one error brings everything down
- Using the cluster module to run each module as a sub-process - I'm currently researching this option, seems promising but requires some work (and cluster is still only experimental)
Can anyone suggest a better way? How have other people done it?