I got this test code: I’m trying to understand why readWithFetch works fine and axios gets connection refused. It’s a simple basic auth… nothing fancy. I’ve tried all these readWithAxios versions: version 1 version 2 version 3 version 4 What is the correct way to write readWithAxios ? Answer You have a triple slash in https:///geolite in the Axios versions.
Tag: node.js
How can we remove the duplicates in async function of java script
I am taking the data from backend for that I am using the async function. But the data contains some duplicate elements so I need to remove them and get those data in DOM. Can we do that. If yes can you explain how to do that. Here data comes from backend and from that data only needed to print
How can I fix this for loop to print results inside an Array with Objects?
Rookie here, I have been breaking my head all day trying to figure this one out… I have tried different approaches trying to figure this out and looking all over this site for some references, but I have come short and hit a roadblock. This is my code currently: I’m trying to get it to console log like this: However,
How to download multiple files from firebase using downloadURL in javascript?
I have this code: but instead of downloading the files it opens them in my browser. The currCart[index] is just the wanted name of the downloaded file. Any suggestions? Answer To download a file, we need to create a Cloud Storage reference to the file we want to download, to do that, you can create a reference by appending child
mongodb .find elements in an array
I have an array that dynamically holds document id’s, in which I need to query another collcetion in mongo to see if the id’s match. I have this code: however, doing “id”: { $in: array_of_docs_bought } doesn’t iterate through the array, so it returns nothing, but when I do this: let documents = await database.collection(‘documents’).find({ “id”: { $in: [ ‘g81h8’,
How to conditionally merge an array in Javascript?
I have a problem, I don’t know how to solve it, I will try not to give too much context and focus on the problem A worker marks hours every day in his work, this is stored in the “dayli_data” array when the worker did not perform his hours then the “time_off” array is returned I have two arrays that
Make nodemon ignore changes in all other files except the one it’s running in the same folder
I am running multiple Discord bots from the same folder. Each is controlled by a single .js file. The problem I have is that whenever I make code changes to one of them, all of the bots restart. I can use the –ignore command to make one instance ignore changes to everything in the folder, but it also ignores changes
generate one of the mutiple possibles anagrams of a string
I’m kind of new to JavaSCript and I want to ask wow can I make a random anagram generator, without a list of all possible anagrams (because that’s not optimized) Example: input: “abc” output: get the input, split it ([“a”, “b”, “c”]), randomize the split and join them ([“cba”]) This is for a command for my bot in Discord. I’ve
Nest JS Table is not creating. Written entities
Team, I have followed Nest.js and TypeORM documentations. Somehow tables are not generating in PostgreSQL. The database is connected successfully. Nest Server running without error. Issue: The table is not generating. src/tag/tag.entity.ts src/app.module.ts .local.env Please help me generate Postgres tables. Framework – Nest JS Database – PostgreSQL Answer Your username is mediumclone but the database you’re connecting to is postgres,
How can i create a directory using Node.js?
how can i write the name and the path of my directory that i will to create in the same node command, like this and remove the path in my script > node ./stack/create.js ./path/folderName i´m trying to create a directory with this script but i want to remove const path in my script and set the path and name