ethers.js/misc/admin/src.ts/cmds/get-config.ts

17 lines
375 B
TypeScript
Raw Permalink Normal View History

2020-11-25 15:29:58 -05:00
import { config } from "../config";
if (process.argv.length !== 3) {
console.log("Usage: get-config KEY");
process.exit(1);
}
const key = process.argv[2];
(async function() {
const value = await config.get(key);
console.log(value);
})().catch((error) => {
console.log(`Error running ${ process.argv[0] }: ${ error.message }`);
process.exit(1);
});