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.

15 lines
374 B

'use strict';
const { readServers } = require('../utils/listFile');
const prettyjson = require('prettyjson');
const { EOL } = require('os');
function listServers() {
const serversList = readServers();
if(serversList) return(EOL + prettyjson.render(serversList));
else throw new Error("No servers were found! Create some using `up`!");
}
module.exports = listServers;