MCPcopy Index your code
hub / github.com/hackmdio/codimd / getSecret

Function getSecret

lib/config/dockerSecret.js:8–12  ·  view source on GitHub ↗
(secret)

Source from the content-addressed store, hash-verified

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

Callers 1

dockerSecret.jsFile · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected