upstream postgres_backend {
server postgres_server_ip:postgres_port;
}
location / {
proxy_pass http://postgres_backend/;
proxy_set_header Host $host;
proxy_read_timeout 60s;
proxy_connect_timeout 60s;
proxy_send_timeout 60s;
}
function walk (node, cbProp, cbObj) {
switch (node.type) {
case 'Array':
node.children.forEach((item) => {
walk(item, cbProp, cbObj);
});
break;
case 'Object':
cbObj(node);
node.children.forEach((property) => {
cbProp(property);
walk(property.value, cbProp, cbObj);
});
break;
}
}