A cli tool to quickly create and manage nginx server blocks.
https://up.js.org
You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
16 lines
397 B
16 lines
397 B
'use strict';
|
|
|
|
const { readServers } = require('../utils/listFile');
|
|
const prettyjson = require('prettyjson');
|
|
|
|
const { EOL } = require('os');
|
|
|
|
function listServers() {
|
|
const serversList = readServers();
|
|
if(serversList) console.log(EOL + prettyjson.render(serversList) + EOL);
|
|
else console.log(EOL +
|
|
"No servers were found! Create some using `up`!" +
|
|
EOL);
|
|
}
|
|
|
|
module.exports = listServers;
|
|
|