Skip to main content

Env

Allows you to consult the development environment that is configured in the config.js file which is found in the root of Netuno. The configuration of the application that has its environment name is used.

// Configured in $NETUNO_HOME/config.js:
config.env = 'development'

current


_env.current() : string

Description

Name of the environment that is configured in Netuno.

How To Use
_out.println(`Current Environment: ${_env.current()}`)
Return

( string )

The name of the current environment.


is


_env.is(name: string) : boolean

Description

Serves to check the current environment, useful in if conditions.

Attributes
NAMETYPEDESCRIPTION
namestringCompares whether the configured environment name in use is the same as the value passed.
Return

( boolean )

Whether the configured environment has the same name.


isGraal


_env.isGraal() : boolean

Description

Serves to check if you are using Graal.

Return

( boolean )

If Graal is in use, true will be returned.