Change src directory to use mediator pattern

This commit is contained in:
Christian Bundy
2020-01-08 08:37:52 -08:00
parent 769a279daa
commit 5f528588b1
6 changed files with 322 additions and 309 deletions

32
src/cli.js Executable file
View File

@ -0,0 +1,32 @@
#!/usr/bin/env node
'use strict'
const yargs = require('yargs')
module.exports = () =>
yargs
.scriptName('oasis')
.env('OASIS')
.usage('Usage: $0 [options]')
.options('open', {
describe: 'Automatically open app in web browser',
default: true,
type: 'boolean'
})
.options('host', {
describe: 'Hostname for web app to listen on',
default: 'localhost',
type: 'string'
})
.options('port', {
describe: 'Port for web app to listen on',
default: 3000,
type: 'number'
})
.options('debug', {
describe: 'Use verbose output for debugging',
default: false,
type: 'boolean'
})
.argv