(secret)
| 6 | const basePath = path.resolve('/var/run/secrets/') |
| 7 | |
| 8 | function getSecret (secret) { |
| 9 | const filePath = path.join(basePath, secret) |
| 10 | if (fs.existsSync(filePath)) return fs.readFileSync(filePath) |
| 11 | return undefined |
| 12 | } |
| 13 | |
| 14 | if (fs.existsSync(basePath)) { |
| 15 | module.exports = { |