Episode #125 of the Stack Overflow podcast is here. We talk Tilde Club and mechanical keyboards. Listen now

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 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
0answers
9 views

Calling asynchronous function within for loop [duplicate]

I'm attempting to call an asynchronous function within a for loop, but obviously since the function acts asynchronously, the for loop completes before it's even able to fully execute the function. ...
0
votes
0answers
13 views

Base/proxy URL for HTTP in production Express/React app

I have a React frontend (made with create-react-app) and an Express backend, with a remote MySQL database. Everything works fine when I run both locally, serving the frontend on localhost:3000 and ...
0
votes
0answers
18 views

Getting HTML instead of JSON in response.data [NodeJS, Axios, VueJS]

I am fairly new to both NodeJS and VueJS, I want to send an object called user, from a GET route in a NodeJS backend app, and get it in my vueJS component using axios to handle the request. All what I ...
0
votes
1answer
17 views

Types for req and res in express?

In this demo I'm attempting to use the DefintelyTyped Response and Request types for the req, res parameters. However this does not compile: const express = require('express'); const app = express();...
0
votes
0answers
4 views

Nodejs Crypto Module Export Public Key

I'm trying to interact with the NodeJS KeyObject from the Crypto library. There is an export() option, but it seems like it can only export the entire private key. Is there any way to export just ...
0
votes
0answers
6 views

npm notify relative dir or filename

es[0] in this code is returning a full absolute path but when trying to use replace to get the relative path it returns [object object] I just need to get the output as string let es = require('...
0
votes
0answers
11 views

How to destructuring this kind of nested Objects?

Following a request on the Microsoft Azure API translator, I get a list of languages as nested objects. I would like to recover only some values like the "language code and name, but I can't ...
0
votes
0answers
11 views

res status 500. Message: Internal server error find product by name and price

I'm trying to find products by name and price. It doesn't execute an error at execution time. But I've got error on postman. I put name in one method and price in other as params this is my product ...
0
votes
0answers
8 views

MERN Stack - Sending file to server using Axios

I've looked at a number of posts on stack overflow, but nothing I've found has helped me so far. I am trying to send an image (file) from my client side to my server, using MERN stack. I am trying to ...
0
votes
0answers
8 views

How to wait for bulk writes to Mongo to complete in NodeJS

I'm doing a series of bulkwrites into Mongo from my NodeJS code. At the end of the bulk writes, I want to create indexes and some other code which should ONLY execute AFTER the bulk writes are ...
0
votes
0answers
8 views

Is it a good solution to implement a synchronous event emitter (awaiting callback of events during emit)

I need to synchronize some steps during the launch of my NodeJs app : declaration of database tables, creation of routes. I've encountered the necessity to create a synchronous event handler in the ...
0
votes
0answers
13 views

server connection issue in node js

I am using the below package. I want to know where is my conductor server ? will I have to download the conductor server? https://www.npmjs.com/package/conductor-client baseURL: 'http://localhost:...
0
votes
0answers
14 views

When redirecting to home route, how do I render data selected from current route?

I am building a PC setup helping website. In my homepage I'll have a list of category of products i.e Processor, Motherboard like 1st picture. As you can see I have run my JS code using node js and ...
0
votes
0answers
7 views

An example javascript function that updates the version of a lambda layer using publishlayerversion function from AWS SDK

I need to write a JavaScript function that will update (and publish) a new version of an existing Lambda Layer. So, something like the following that I found online: const publishLayerVersion = ...
0
votes
1answer
14 views

Restarting pm2 from cron/shellJS - bcrypt version error

I'm trying to set up a crontab process in Ubuntu 18.04 to periodically check on the status of pm2 and restart it if necessary. Because I'm more familiar with JavaScript, I decided to have the crontab ...

15 30 50 per page