Quick Note:
SailsJs on cloud9 works wonderfully until you try to lift sails on a different port than the c9 default.
Cloud9 tries to help us by setting PORT and IP environment variables that turn into ‘process.env.PORT’ and ‘process.env.IP’ in nodejs. This is actually very helpful for generic node and express apps, but sailjs has an expectation that you set the port in its configuration files, and these environment variables override those settings.
For example, I set my ports in the previous post about nginx and sails in the config/env/development.js file. This setting (PORT:5001) works fine on locally installed sails projects but when trying to lift sails on my c9 ssh project everything failed miserably. The solution is simple, though not immediately obvious: remove the c9 environment variable. It has been a few days since I figured out that this environment variable exists and deleted it, and thus far there have been no unintended consequences.
On ubuntu the following command was all it took:
unset PORT
duh.