Sh3ll
OdayForums


Server : Apache
System : Linux profile 3.10.0-1160.88.1.el7.x86_64 #1 SMP Tue Mar 7 15:41:52 UTC 2023 x86_64
User : apache ( 48)
PHP Version : 8.0.28
Disable Function : NONE
Directory :  /lib/node_modules/pm2/node_modules/@pm2/agent/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Current File : //lib/node_modules/pm2/node_modules/@pm2/agent/config.js
'use strict'

/**
 * Convert value to boolean but false if undefined
 * @param {String} value
 * @param {String} fallback default value
 * @return {Boolean}
 */
const useIfDefined = (value, fallback) => {
  if (typeof value === 'undefined') {
    return fallback
  } else {
    return value === 'true'
  }
}

/**
 * Configuration for transporters
 * Configuration by transporter :
 * @param {Integer} enabled
 * @param {Object|String} endpoints sended as first arg with connect() method
 */
module.exports = {
  transporters: {
    axon: {
      enabled: false, // useIfDefined(process.env.AGENT_TRANSPORT_AXON, false),
      endpoints: {
        push: process.env.AGENT_PUSH_ENDPOINT || 'push',
        pull: process.env.AGENT_REVERSE_ENDPOINT || 'reverse'
      }
    },
    websocket: {
      enabled: true, // useIfDefined(process.env.AGENT_TRANSPORT_WEBSOCKET, true),
      endpoints: process.env.AGENT_WEBSOCKET_ENDPOINT || 'ws'
    }
  }
}

ZeroDay Forums Mini