Questions tagged [node.js]

Node.js is an event-based, non-blocking, asynchronous I/O runtime that uses Google's V8 JavaScript engine and libuv library. It is used for developing applications that make heavy use of the ability to run JavaScript both on the client as well as on the server side and therefore benefit from the re-usability of code and the lack of context switching.

Filter by
Sorted by
Tagged with
0 votes
0 answers
3 views

How to use sourcemaps with node.js workder_threads using eval option?

I am spinning up my express application written in TypeScript using the Worker provided by core workder_threads module. I use esbuild to compile and bundle the TS code into a single file with ...
0 votes
0 answers
11 views

axios get request to localhost:4000/ gives responseUrl of localhost/ resulting in 404 error

I am adding a server extension to an existing backend: import server from 'myserver'; import { verifyJwt } from 'jwt.middleware'; import axios from 'axios'; const app = server.getApp(); app.use(...
  • 2,384
0 votes
1 answer
12 views

Don't know why my API url does not work on my client-side (browser) but works perfectly on POSTMAN [closed]

My API works perfectly on Postman and co, but doesn't seem to work on the client side of my apllication. It displays this error on the browser: POST https://mywebsite.com/admin/signin net::...
0 votes
3 answers
33 views

Reading anything between {{ and }} regex in JavaScript

I would like to get any string between {{ and }} using Regex. for example {{user.email}} should return user.email. To achieve this I have written the below Regex: const str = '{{user.email}}' const ...
  • 347
-2 votes
0 answers
14 views

Variable Global Javascript vacia [duplicate]

** Tengo este codigo, la variable jsonData es una variable que esta declarada fuera de las consultas en el console.log que esta dentro del for me desplega bien los datos, pero cuando los quiero ...
0 votes
0 answers
11 views

Node js- Access and query windows printer queue

I am developing a printer management software in nodejs. For this I need access to the printer queue, so as to log the details of the ongoing printing task. I need access to the number of copies, page ...
1 vote
1 answer
12 views

How should we handle data sorting in websocket api?

We have a page built in ReactNative, which is showing live data using Websockets based api. We want to give option to sort the data depending upon the user selected field. How should we do the data ...
0 votes
0 answers
7 views

Passport google authentication is returning [Function: authenticate] instead of google login page

I'm trying to use passport to login with google. So here's how I created my files. Created Passport.js for passport configurations which looks like below, const passport = require('passport'); const ...
  • 607
-1 votes
0 answers
17 views

/opt/homebrew/bin/node: No such file or directory

I installed node using brew install node@18 when i cd /opt/homebrew/bin and then run node, I see node terminal for me to run command but when i execute /opt/homebrew/bin/node from a shell script I see ...
-1 votes
0 answers
15 views

Access to S3 images blocked by CORS policy on external browsers in React.js website with Node.js backend

I have a React.js website with a node.js backend and I'm trying to load some images from S3 Storage. I've already set up CORS settings in S3, as shown below: <CORSConfiguration> <CORSRule> ...
0 votes
0 answers
18 views

Why npm -v is slow?

Why does showing npm version command takes more than 1 second? what does it do under the hood? The command I run on my MacOS: $ npm -v 8.15.0 Version: Monterey 12.6.1 (21G217) Updated Feb 15 npm is ...
  • 116
0 votes
1 answer
7 views

python flask responds correctly to fetch function in node.js but gives a bad request from chrome console or website javascript

Why this javascript code works in node.js but not in chrome ? By the way, curl -X POST -H "Content-Type: application/json" -d '{"prompt":"testprompt"}' 192.168.122.234:...
0 votes
0 answers
5 views

node.js with express having trouble with using csurf

I am using ejs, and express to do this. I am not sure why this is keep giving me error of invalid token and I am using csurf dependency router.get("/recipeUpload", function (req, res) { ...
-3 votes
0 answers
12 views

I want to render JavaScript function in every 100-millisecond using node node-corn. can it possible, then give me solution

I want to render JavaScript function in every 100-millisecond using node node-corn I try many way but unable to convert cron pattern into milli seconds.
-1 votes
0 answers
9 views

Can't validate emails using anything (Node JS)

I'm trying to find a way to validate emails, but everything I use will either return false all of the time, or return true all of the time. I've tried deep email validator; which returns false, email ...
  • 17

15 30 50 per page
1
2 3 4 5
30463