Category "node.js"

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

Can you add apps made from (js, nodejs, express and mongodb) in a wordpress website?

I already have a wordpress website. I studied web development using js, node.js, express and mongodb and build some projects. I would like to add it to my websi

What is the best way to test secure routes on APIs that requires authentication while using Cognito OAuth with MFA?

I am using AWS Cognito with MFA and I can't use an actual user with a session to test the routes in with supertest testcases. What is the best practice for test

yarn start FATAL ERROR: Ineffective mark-compacts near heap limit Allocation failed - JavaScript heap out of memory

Receiving this error with yarn start I tried many solutions with this error through stakeoverflow using this link FATAL ERROR: Ineffective mark-compacts near h

Await component doesn't send OK

I would like to do a await message and list for my setWelcome but it does not send me Ok when I select in the Select menu and I do not know if it is good for th

Async/Await function failing

I'm trying to build a nodeJS script that pulls records from an Airtable base, bumps a UPC list up against the [UPC Item DB API][1], writes the product descripti

Stylelint wont mark errors in VSCode

VScode doesn't show me any stylint errors. package.json: ... "postcss": "^8.4.12", "postcss-scss": "^4.0.3", "stylelint": "^14.7.1", "stylel

npm shows vulnerabilities when installing firebase tools

I already installed node js and when I try to run npm install -g firebase-tools, it shows me this error, and it says run npm audit fix [#########.........] | re

execute next request once the execution of first request is completed in node

Let's assume I have an endpoint /print. Whenever a request is made to this endpoint, it executes a function printSomething(). While printSomething() is processi

How to merge multiple in index into single page applications

I have these two ReactDOM renders to merge into single ReactDOM, having difficulties in merging. ReactDOM.render( <Provider store={store}> <Brows

How do I fix cast error to object Id failed in mongoose?

I'm using passport js for google authentication and when I try going to login page I get this error "CastError: Cast to ObjectId failed for value "xxxxxxxx" (ty

discord.js check if user has permissions

I want a command that can only be used by people who have the ban permission current code: if(msg.member.guild.me.hasPermission('BAN_MEMBERS')) { msg.

Getting Missing Months

I am working on a project where I am trying to chart the number of monthly order that I have received. My current data for monthlyOrder is: [ { _id: { mon

How to save Pino logs in save fomatted by pino-pretty

first of all I thank you for the help. I want to save the pino-logs in a file (I go it) with the pretty-format. The pretty works successfully in terminal logs b