Skip to content

Tag: node.js

Slack API upload string as file

I have a sting variable of a csv. I want to upload it to a slack channel as a .csv file, not as text. This code returns: error: ‘no_file_data’, Changing content to file gives the same response. What do I have to do to convert the csv sting into a file that can be uploaded? I can’t use fs to

How to get My PUBLIC IP address Using Node js

I want to get my Public IP address using Node js only For example when i search on Google “What is my Ip address ” Gives me output like 10X.XX.XX.XXX How to get this Ip address Using node js without importing any Libraries like ip , Public-ip etc … I want to write my Custom Code to get publi…

How to easily display Image from Node JS

I can’t find a simple solution how to display an image on my website. I can read it in my node js backend but it will download the file instead of placing in my img tag. Do you have a simple solution for that? Thank you very much! HTML NODE JS Answer The problem you face here is not how

Row results from Tedious Request.on not being saved

I have a function queryDatabase() in my nodeJS application, which is responsible for querying an Azure SQL DB and returning the result, using the Tedious library to connect to the DB. Currently, to return the data retrieved from the DB I am iterating through the rows returned by the query, saving the data to …

Removing “,” at the beginning of a line CSV

i want to convert a .csv file and write a new one. However I am not able to remove the first , i am kinda stuck here and it is driving me crazy. This is my code: That’s the output i am getting in the newly generated file Output extractedtasks: Output extractedtasksformated: Answer Because extractedtasks…