First, forgive my lack of understanding of Joyent's smartmachine instance. I am running a free dev tier smartmachine instance of NodeJS for this scenario.
I am running a website at [path]/server/public/
on the filesystem via http-server and I want to simultaneously run a Ghost blog at [path]/server/public/blog/
, both on port 80.
Is this possible? How would I accomplish it?
Setting up a thin wrapper using express can be a good solution (as Paul recommends), but can be a mess if you end with a big application with a lot of "diferennt services".
Instead ill go for a proxy (NGINX for example) on top of all my services.
With this solution, if a service fails, the rest no since they are decoupled.
You can listen on port 80 and proxy internally to each service:port.
Something like:
0.0.0.0:80 ---> Proxy
└──path: / ─── localhost:3000 (Main Web)
└──path: /blog ─── localhost:4000 (Ghost)
...