Nuxt/packages/cli/src/options/server.js
2018-10-30 01:46:16 +03:30

30 lines
644 B
JavaScript

import consola from 'consola'
export default {
port: {
alias: 'p',
type: 'string',
description: 'Port number on which to start the application',
prepare(cmd, options, argv) {
if (argv.port) {
options.server.port = +argv.port
}
}
},
hostname: {
alias: 'H',
type: 'string',
description: 'Hostname on which to start the application',
prepare(cmd, options, argv) {
if (argv.hostname === '') {
consola.fatal('Provided hostname argument has no value')
}
}
},
'unix-socket': {
alias: 'n',
type: 'string',
description: 'Path to a UNIX socket'
}
}