OK.. This is a quick and dirty how to check if your project in running in the c9.io ...
When you have c9.io's IDE open and you go to terminal.
type echo $C9_PID
.
If you notice it shoots our a number. This is your project id that c9 uses for there internal id system
This env var is global to every nodejs app that gets ran from ide.
so in nodejs
if(process.env.C9_PID){
//IS RUNNING IN C9.IO
}else{
//not running in c9.io
}