MCPcopy Create free account
hub / github.com/ShipSecAI/studio / resolveEnvFile

Function resolveEnvFile

pm2.config.cjs:278–286  ·  view source on GitHub ↗
(appName, instance)

Source from the content-addressed store, hash-verified

276
277// Get env file (use instance-specific if it exists, otherwise fall back to root)
278function resolveEnvFile(appName, instance) {
279 const instancePath = getInstanceEnvFile(appName, instance);
280 const rootPath = __dirname + `/${appName}/.env`;
281
282 if (fs.existsSync(instancePath)) {
283 return instancePath;
284 }
285 return rootPath;
286}
287
288module.exports = {
289 apps: [

Callers 1

pm2.config.cjsFile · 0.85

Calls 1

getInstanceEnvFileFunction · 0.85

Tested by

no test coverage detected