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.

17 lines
319 B

'use strict';
function removeFromArray (arr, dom, port) {
let shouldDelete = [];
for(let 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);
}
return arr;
}
module.exports = removeFromArray;