concept environment in category coffeescript

appears as: environments, environment, The environment, n environment
CoffeeScript in Action

This is an excerpt from Manning's book CoffeeScript in Action.

Although the Object.create method is part of the fifth edition of the ECMAScript standard, it isn’t available in all environments. In particular, versions of Internet Explorer prior to IE9 don’t have Object.create. A version of Object.create that you can use when targeting environments that don’t have one built in is found in chapter 11. Exactly what Object.create does is also covered in that chapter.

If you’re deploying to multiple servers, then the deployment process will be more complicated, but the basic concepts remain the same. In this section you’re at step 1, where you’ll create a version of your application, an artifact, that is ready for deployment, as well as a manifest that will give the application information it needs to run on the environment you deploy it to.

The application doesn’t magically know which environment it’s running in. You have to tell it by using an environment variable. Inside a Node.js application, you can access environment variables through process.env. The environment variable you’ll use is called NODE_ENV and is either set for you by the environment you’re running on or is set by you when your program is started on the command line. Suppose it’s already set; here’s how not to use the NODE_ENV environment variable: