-
Notifications
You must be signed in to change notification settings - Fork 0
/
index.js
35 lines (29 loc) · 1.11 KB
/
index.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
#! /usr/bin/env node
const commander = require("commander")
const create = require("./commands/create.js")
const withdraw = require("./commands/withdraw.js")
const deposite = require("./commands/deposit.js")
const show = require("./commands/show.js")
const fsPromises = require('fs/promises')
const path = require("path")
commander.program
.command('CREATE <ACCNO> <ACCNAME>')
.alias('create')
.description('This command used to CREATE an account in kelp-bank')
.action(create)
commander.program
.command('DEPOSIT <accNo> <amount>')
.alias('deposit')
.description('This command used to DEPOSIT amount to kelp-bank account')
.action(deposite)
commander.program
.command('WITHDRAW <accNo> <amount>')
.alias('withdraw')
.description('This command used to WITHDRAW amount from kelp-bank account')
.action(withdraw)
commander.program
.command('BALANCE <accNo> [accName]')
.alias('balance')
.description('This command used to check BALANCE in kelp-bank account')
.action(show)
commander.program.parse()