Skip to content

Instantly share code, notes, and snippets.

@JBreit
Created May 26, 2017 06:29
Show Gist options
  • Select an option

  • Save JBreit/f8802c80e37b55bd55e929505e620b75 to your computer and use it in GitHub Desktop.

Select an option

Save JBreit/f8802c80e37b55bd55e929505e620b75 to your computer and use it in GitHub Desktop.
#!/usr/bin/env node
const { log } = require('./logger');
switch (process.argv[2]) {
case 'start':
log('start command detected');
break;
case 'stop':
log('stop command detected');
break;
case 'test':
log('test command detected');
break;
case 'help':
log('help command detected');
break;
default:
log('no command given');
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment