(async () => {
for await (const arr of newArr) {
for await (const el of arr) {
try {
await this.prisma.payments.upsert({
where: { transaction_id: el.transaction_id },
create: el,
update: el,
});
} catch (error) {
console.log({ error });
}
}
}
})();
DO $$
DECLARE tableId bigint;
BEGIN
INSERT INTO public.users(first_name, second_name, password) VALUES ('dfg', 'ddf', 'dfgfg') RETURNING id INTO tableId;
INSERT INTO public.user_phone_number(user_id, phone_number) VALUES (tableId, '343443');
COMMIT;
END $$;
server {
listen 80;
server_name site.com;
root /var/www/dist;
index index.html;
location /back/ {
proxy_http_version 1.1;
proxy_set_header X-Forwarded-For $remote_addr;
proxy_set_header Host $http_host;
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection 'upgrade';
proxy_pass http://127.0.0.1:5000/;
}
}
curl http://127.0.0.1:5000/
и получаю ответcurl http://site.com/back/
и получаю ответ