@liara/cli
Version:
The command line interface for Liara
14 lines (13 loc) • 423 B
JavaScript
import inquirer from 'inquirer';
import { getDefaultPort } from './get-port.js';
import validatePort from './validate-port.js';
export async function promptPort(platform) {
const { port } = (await inquirer.prompt({
name: 'port',
type: 'input',
default: getDefaultPort(platform),
message: 'Enter the port your app listens to:',
validate: validatePort,
}));
return port;
}