diff options
author | Florian Dold <florian.dold@gmail.com> | 2019-08-14 18:49:56 +0200 |
---|---|---|
committer | Florian Dold <florian.dold@gmail.com> | 2019-08-14 18:49:56 +0200 |
commit | 94357e226d27d028ca95bde5174aa0ed49041187 (patch) | |
tree | 3d0136c82e264e3fe255ab1d08608972a9896143 /src/headless/taler-wallet-cli.ts | |
parent | 11acb0c4035e38f8ffe0d26b845bfa50e777f4b3 (diff) |
index for node package
Diffstat (limited to 'src/headless/taler-wallet-cli.ts')
-rw-r--r-- | src/headless/taler-wallet-cli.ts | 13 |
1 files changed, 8 insertions, 5 deletions
diff --git a/src/headless/taler-wallet-cli.ts b/src/headless/taler-wallet-cli.ts index 435210fcc..0c6c2ba98 100644 --- a/src/headless/taler-wallet-cli.ts +++ b/src/headless/taler-wallet-cli.ts @@ -231,7 +231,7 @@ class MerchantBackendConnection { } } -async function main() { +export async function main() { const myNotifier = new ConsoleNotifier(); const myBadge = new ConsoleBadge(); @@ -349,7 +349,10 @@ async function main() { myWallet.stop(); } -main().catch(err => { - console.error("Failed with exception:"); - console.error(err); -}); + +if (require.main === module) { + main().catch(err => { + console.error("Failed with exception:"); + console.error(err); + }); +} |