UNPKG

456 BJavaScriptView Raw
1#!/usr/bin/env node
2
3const cli = require('commander')
4const fs = require('fs')
5
6let { version } = JSON.parse(fs.readFileSync(`${__dirname}/../package.json`, 'utf8'))
7
8cli
9 .version(version)
10 .command('init <name>', 'create blank Backrest template').alias('i')
11 .command('start', 'start the server').alias('s')
12 .command('stop', 'stop the server')
13 .command('generator <controllerName>', 'generate a controller file').alias('g')
14 .parse(process.argv)