node-cooper-fastify - v0.2.0
    Preparing search index...

    Function fileTag

    • The !file tag for a project rooted at root: it reads the file its argument names -- relative to root, or absolute -- as UTF-8 text.

      Text, not a Buffer, because what it is for is text: PEM keys and certificates, which Fastify and node:tls take as strings.

      The environment may choose the file (!file("${TLS_KEY}")), which !module deliberately does not allow for code: reading a file runs nothing.

      Parameters

      • root: string

        the directory a relative path is read from

      Returns (argument: unknown) => string

      loadFileSync('config/config.casc', { tags: { file: fileTag(process.cwd()) } });