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.
12 lines
298 B
12 lines
298 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);
|
|
}
|
|
return arr;
|
|
}
|
|
|
|
module.exports = removeFromArray;
|