async isRunning() {
        if (!this._cliConfig.has('running')) {
            const currentEnvironment = this.system.development;

            const envIsRunning = async (environment) => {
                if (!Config.exists(path.join(this.dir, `config.${environment}.json`))) {
                    return false;
                }

                this.system.setEnvironment(environment === 'development');
                const running = await this.process.isRunning(this.dir);
                if (running) {
                    this._cliConfig.set('running', environment).save();
                }

                return running;
            };

            const production = await envIsRunning('production');
            if (production) {
                return true;
            }

            const development = await envIsRunning('development');
            if (development) {
                return true;
            }

            this.system.setEnvironment(currentEnvironment);
            return false;
        }

        this.loadRunningEnvironment();

        const running = await this.process.isRunning(this.dir);
        if (!running) {
            this._cliConfig.set('running', null).save();
        }

        return running;
    }
/**
     * Returns whether or not the instance is currently running.
     *
     * @return {Promise<Boolean>} true if instance is running, otherwise false
     *
     * @method running
     * @public
     */
Returns whether or not the instance is currently running.
@return {Promise} true if instance is running, otherwise false

@method running
@public
Returns whether or not the instance is currently running . @return { Promise } true if instance is running otherwise false @method running @public
async isRunning() {
        if (!this._cliConfig.has('running')) {
            const currentEnvironment = this.system.development;
            const envIsRunning = async (environment) => {
                if (!Config.exists(path.join(this.dir, `config.${environment}.json`))) {
                    return false;
                }
                this.system.setEnvironment(environment === 'development');
                const running = await this.process.isRunning(this.dir);
                if (running) {
                    this._cliConfig.set('running', environment).save();
                }
                return running;
            };
            const production = await envIsRunning('production');
            if (production) {
                return true;
            }
            const development = await envIsRunning('development');
            if (development) {
                return true;
            }
            this.system.setEnvironment(currentEnvironment);
            return false;
        }
        this.loadRunningEnvironment();
        const running = await this.process.isRunning(this.dir);
        if (!running) {
            this._cliConfig.set('running', null).save();
        }
        return running;
    }
async isRunning ( ) { if ( ! this . _cliConfig . has ( 'running' ) ) { const currentEnvironment = this . system . development ; const envIsRunning = async ( environment ) => { if ( ! Config . exists ( path . join ( this . dir , ` ${ environment } ` ) ) ) { return false ; } this . system . setEnvironment ( environment === 'development' ) ; const running = await this . process . isRunning ( this . dir ) ; if ( running ) { this . _cliConfig . set ( 'running' , environment ) . save ( ) ; } return running ; } ; const production = await envIsRunning ( 'production' ) ; if ( production ) { return true ; } const development = await envIsRunning ( 'development' ) ; if ( development ) { return true ; } this . system . setEnvironment ( currentEnvironment ) ; return false ; } this . loadRunningEnvironment ( ) ; const running = await this . process . isRunning ( this . dir ) ; if ( ! running ) { this . _cliConfig . set ( 'running' , null ) . save ( ) ; } return running ; }
Returns whether or not the instance is currently running.
Returns whether or not the instance is currently running .