So here’s the thing, we have a “machine state” that we prefer Mail-in-a-Box users have, so that it is easier to provide community support, since you don’t have a bunch of outrageous modifications to a machine.
That doesn’t mean we aren’t nice and kick you to the curb if you make some minor changes here and there, but the more modifications you make, the more people find it difficult to help you (hence, don’t want to sometimes).
Now, I am not an nginx expert, but I think it would be reasonable to make a small modification to redirect or proxy traffic to another server where your nodejs, if you are not comfortable with using a different Fully Qualified Domain Name (FQDN) than what your mailinabox server is using.
If you don’t understand what I’m saying, let’s say you bought example.com. You have a theoretical unlimited amount of FQDN’s for example.com, since you can create sub-domains ( www.example.com, mail.example.com, server-1.mail.example.com, being examples ). You can use each domain for a different server.
So my question is, which domain are you wanting to use Mail-in-a-Box for, and which domain are you wanting to use your nodejs stuff for? Will they all have the same domain? If they will be on the same domain, you will need to modify Mail-in-a-Box’s nginx configuration, which is technically an “unsupported” modification. Like I said earlier, “unsupported modification” basically means “if you can, avoid doing this”.
Now, you can have mail sent/received on a different domain than it appears. If you have mail.example.com as your MIAB domain, you can setup an A and AAAA ( see IPv6 necessary? recommended? or don't bother? ) that points to server1 (“server1” will be your MIAB box), but have an MX record for example.com point to mail.example.com, which points to server1 (according to your A/AAAA record), so that mail users get/send from example.com, but their web interface would have to be mail.example.com. Then, you can have nodejs (“server2”) be on example.com and have example.com’s A and AAAA records point to server2, without an unsupported modification.
Anyways, it all depends on the setup you want. This sounds like it depends on how you want your DNS set up, and if what I said sounds Greek, we can help you walk through your DNS options a bit more.