UNPKG

parsec-node

Version:

https://parseclabs.readthedocs.io/en/latest/

25 lines (18 loc) 578 B
/** * Copyright (c) 2018-present, Parsec Labs (parseclabs.org) * * This source code is licensed under the Mozilla Public License Version 2.0 * found in the LICENSE file in the root directory of this source tree. */ /* eslint-disable no-console */ const fs = require('fs'); const { promisify } = require('util'); const readFile = promisify(fs.readFile); module.exports = async configPath => { const config = JSON.parse(await readFile(configPath)); if (!config.bridgeAddr) { console.error('bridgeAddr is required'); process.exit(0); } return config; };