All Questions
Tagged with node.js javascript
177,562
questions
0
votes
0
answers
50
views
How do I store a parametrized string in database?
My question is in the context of JavaScript.
Consider the object
{'name':`${name}`,'age':10}
My goal is to store this object in a database and then retrieve it in another session. The other session ...
-3
votes
0
answers
33
views
JavaScript Set not working correctly locally? [closed]
I'm writing a little tool in NodeJS v20.13.0 and I'm using Sets to avoid handling directly duplicate data.
When using the difference method between two set I got the following error:
Code example
...
0
votes
0
answers
24
views
+100
auth 2.0 from Microsoft not redirecting to call back url after successful permission accept
I have the following NodeJS code
async onedrive (
addon: AddOn,
app: express.Application,
req: any,
res: any
) {
const storageType = req.query.storageType; // Get the selected ...
0
votes
0
answers
41
views
Facing error while encrypting password in nodejs and showing it to workbench mysql
I'm currently developing a password manager application using Node.js and React. I'm facing an issue with encryption and decryption functionality using the AES-256-CTR algorithm. Whenever I attempt to ...
-3
votes
0
answers
20
views
Regex to match alphanumerics and hyphens only, without hyphens at the ends [duplicate]
I need a regular expression that accepts only alphanumeric characters ([a-zA-Z0-9]) and hyphens (-). The hyphen should not be at the beginning or the end of the string. Multiple hyphens are allowed ...
0
votes
1
answer
39
views
How to add javascript class methods from separate file includes
I have been working with a modular backend, nodejs + typescript + esbuild.
This is an app that at it's core is made up of a class module and child modules that add methods to that class (see below ...
0
votes
0
answers
23
views
Why is my Google social login working despite my app not being published?
I have implemented Google social login for my web application. Here are the steps I've taken so far:
Created an OAuth 2.0 Client ID in the Google Cloud Console.
Added my application's domains under &...
-1
votes
0
answers
14
views
Accurately Capture DOM Element as JPG/PNG in Different Environments?
How to Accurately Capture DOM Element as JPG/PNG in Different Environments?
I'm developing a resume generator app and need to capture a specific DOM element (containing the resume) as an image in JPG ...
0
votes
2
answers
57
views
How to implement this npm library with javascript and NodeJS
I'm getting back into internet programming after taking a class on it a few years ago and I'm trying to implement a library into my website.
For this project, I want to use these animated diagrams of ...
-1
votes
0
answers
68
views
Promise.All() executing but resolving Promises immediately without waiting for responses
I am trying to execute some tasks in parallel (literally, spread over multiple threads and CPU cores) via firing them off using Promise.All(), which then calls a function that sets them off to work ...
2
votes
2
answers
48
views
puppeteer scraping dynamic content
I'm trying to scrape data from a Looker Studio web page report using Puppeteer in Node.js, but I'm encountering issues because the report is dynamic. When I fetch the data, the body is empty. Here's
...
1
vote
0
answers
43
views
NodeJS fetch is tremendously slow with Google API
I use the fetch-node@2 version, and whenever I try to access the Google API via NodeJS, the response time is tremendously and painfully slow. I'm literally waiting 6-8 seconds to retrieve the data. On ...
-2
votes
0
answers
32
views
How to view and browse the source code of JS packages [closed]
When I'm coding with Python I often check the implementation of the packages I'm using to see how they work and how they're implemented etc.
When working with JS, I try to do that but usually find the ...
0
votes
0
answers
18
views
Extending socket.io Socket interface with custom properties like user_id not recognized
I'm currently implementing authentication with socket.io in TypeScript for my project. When a user connects, I need to store their user_id on socket.user_id after verifying their JWT token in a ...
0
votes
0
answers
34
views
cannot set routes for my express aplication [closed]
so this is my server.js
const express = require('express');
const bodyParser = require('body-parser');
const app = express();
const port = 3000;
const sequelize = require('./db');
const userRoutes = ...