Skip to content

Instantly share code, notes, and snippets.

@bmatusiak
Created November 26, 2012 01:41
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save bmatusiak/4146157 to your computer and use it in GitHub Desktop.
Save bmatusiak/4146157 to your computer and use it in GitHub Desktop.
How to Check to see if your project running in cloud9

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
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment