32 lines
610 B
JavaScript
Executable File
32 lines
610 B
JavaScript
Executable File
#!/usr/bin/env node
|
|
|
|
const yargs = require('yargs')
|
|
const app = require('./src/app')
|
|
|
|
const config = yargs
|
|
.env('OASIS')
|
|
.usage('Usage: $0 [options]')
|
|
.options('open', {
|
|
describe: 'automatically open app in web browser',
|
|
default: true,
|
|
type: 'boolean'
|
|
})
|
|
.options('host', {
|
|
describe: 'hostname to listen on',
|
|
default: 'localhost',
|
|
type: 'string'
|
|
})
|
|
.options('port', {
|
|
describe: 'port to listen on',
|
|
default: 3000,
|
|
type: 'number'
|
|
})
|
|
.options('debug', {
|
|
describe: 'console debug output',
|
|
default: false,
|
|
type: 'boolean'
|
|
})
|
|
.argv
|
|
|
|
app(config)
|