Files
cyphernode/cyphernodeconf_docker/prompters/200_postgres.js
2021-11-23 12:05:10 -05:00

30 lines
663 B
JavaScript

const chalk = require('chalk');
const name = 'postgres';
const capitalise = function( txt ) {
return txt.charAt(0).toUpperCase() + txt.substr(1);
};
const prefix = function() {
return chalk.green(capitalise(name)+': ');
};
module.exports = {
name: function() {
return name;
},
prompts: function( utils ) {
return [
{
type: 'password',
name: 'postgres_password',
default: utils.getDefault( 'postgres_password' ),
message: prefix()+'Password of Postgres cyphernode user?'+utils.getHelp('postgres_password'),
filter: utils.trimFilter,
}];
},
templates: function( props ) {
return ['pgpass'];
}
};