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
390 B

function removeFromArray (arr, dom, port) {
var shouldDelete = [];
for(var i = 0; i < arr.length; i++) if((arr[i].domain == dom) && (arr[i].outPort == port)) shouldDelete = [true, i];
if (shouldDelete[0]) {
arr.splice(shouldDelete[1], 1);
console.log('\nItem was deleted!\n');
} else {
console.log('\nItem was not found!\n');
}
return arr;
}
module.exports = removeFromArray;