Category "node.js"

Joins on database engine vs on client-side [duplicate]

I am creating an API with express.js for a food app and I can't figure out what is the best (most efficient) way to query the data and send it

Nodejs encrypt and decrypt using crypto decrypt badly only firsts characters

I have a js script that crypt and decrypt a file using these two functions Encryption function encryptFile(fileName) { const input = fs.createReadStream(fil

Understanding how path works in Node

So I have developed a Node Api and on local the path works fine, but I want to move it now to a server online, and don't know how to address the path. This is t

Defining API class in component based structure

I have been reading the 'Node JS Best Practices' Github article. One point that I I found interesting was the very first best practice. Here they split up the p

Error pulling my own TypeScript package from NPM after using direct reference to GitHub branch for debugging

I have two packages that are both held on NPM, we can refer to them as A and B A uses B, so when I PR and merge with B it automatically updates NPM with those d

nodejs 10 stubbornly installing in ubuntu 20 even after adding new verision ppa

I am trying to install node.js latest version from node.js source official github repo. but after all running all commands yet, at apt-get install nodejs. syste

Mongoose - "Enriched" Query with Data from other Collection

I'm quite new to using Mongoose and therefore not too familiar with operations that go beyond finding data in a single collection. Was googling approaches to ac

NPM Workspaces Typescript unable to find local modules

I have a NodeJS monorepo set up using NPM workspaces and Typescript. It works fine without Typescript, however introducing TS brings some dependency resolving e

I am getting an error 404 using nodeJS and express

I'm having an issue with the routes in my project called review. My other routes have no issue so I'm not sure where I went wrong here. I keep getting error 404

I'm trying to implement Infinite Scrolling in a React application using the IntersectionObserver API but i'm running into some issues

I'm trying to implement infinite scrolling and it's supposed to work by getting data in pages from the API...and then using the IntersectionObserver API, checki

Why there is a need to create a server in NodeJS application?

Learning Nodejs for my personal projects. Analysing other developers code examples, watching youtube videos. I noticed one thing that I don't understand complet

OpenTelemetry collector does not export Metric attributes to New Relic

I am attempting to export Metrics to an OpenTelemetry collector container from my Node.js app, which then exports it to New Relic. I am making a simple request

Is there an equivalent for Heroku app logs for Netlify?

I have migrated off heroku due to their issues with github, but one thing I really found useful were the live application logs. What is the equivalent for that

Connect-flash not worked when imported via ES6 module import

I'm trying to setup connect-flash for my nodejs express application. I'd like for a message to be flashed when a user goes to certain pages. I'm using ES6 packa

node js - Download pdf via HTTP post and upload to azure blob storage

I've an online API that returns PDF files via HTTP post requests. Once I get back the response with the file I would like to upload the file in an azure blob st

How can i build an URL with searchaparams [duplicate]

for example : i want users to enter http://localhost:5000/ANY_FILE_NAME?height=200?width=200 in URL bar how can i build the URL to receive the

POST http://127.0.0.1:5500/add 405 (Method Not Allowed)

Could you help me solve this error? It seems that I can not connect between server.js and app.js. What I want to do is: display the result of the postData('/add

Using Postgraphile in nodeJS, how to enable aggregate max of date field?

I am using postgraphile in NodeJS for graphql API based on Postgresql database. I need to get max(date_field), but postgraphile does not provide that option by

PinoWarning: prettyPrint is deprecated, look at https://github.com/pinojs/pino-pretty for alternatives

I suddenly started getting following error in my nodejs project [PINODEP008] PinoWarning: prettyPrint is deprecated, look at https://github.com/pinojs/pino-pret

PinoWarning: prettyPrint is deprecated, look at https://github.com/pinojs/pino-pretty for alternatives

I suddenly started getting following error in my nodejs project [PINODEP008] PinoWarning: prettyPrint is deprecated, look at https://github.com/pinojs/pino-pret