     core.export global
 
     #
+    # set the environment
+    #
+    define 'ENVIRONMENT', process.env.ENVIRONMENT ? process.env.NODE_ENV ? 'development'
+
+    #
     #  The coffee-script file extension
     #
     define 'EXT', '.coffee'

    define 'MODPATH', if is_dir($modpath) then realpath($modpath) + '/' else false

    #
    #   Initialize the API
    #
    core()

    #
    #   Create the top level system controller
    #
    define 'exspresso', new system.core.Exspresso


    define 'FCPATH', realpath(__dirname) + '/'

    #
    #  Path to the system folder
    #
    define 'SYSPATH', FCPATH + 'system/'

    #
    # The path to the "application" folder
    #
    define 'APPPATH', if is_dir($apppath) then realpath($apppath) + '/' else FCPATH + 'application/'

    #
    # The path to the "assets" folder (optional)
