Skip to content

Tag: node.js

Iterate over cells in a CSV file in Node.js

I have a CSV file: “myCSV.csv” with two columns: “first” and “second”. All the data inside is just numbers. So the file looks like this: I would like to iterate over these numbers and perform some custom parsing on them, then store results in an array. How can I achieve a b…

HttpOnly cookie is set only after the second request

I have a server (Node.js + Nest.js) and a client (Angular 11). The client submits a login request and the server logs in the user and sets a HttpOnly cookie in the response. The wierd thing is that the cookie is set in the browser only after submitting 2 requests, then it works fine (If i use postman for exam…

Running a query inside the same connection in nodejs

There is a need to run the second sql query (query2) after building it using results of first query (query1) in mentioned space in code snippet, this second sql query will be generated according to the results of first query. but when I tried to run this, it builds the second query without any issue, but it i…