express req.connection.remoteAddress is sometimes undefined
I'm using express to receive and process various HTTP requests in my application. I need to have the client's remote IP address and I am obtaining it in the following way:function onPostRequest(req,...
View ArticleHow to use a custom express-validator?
I'm developing a register form and I'm using express-validator to validate fields but I'm having troubles in validate if email already exists.I did a select to check if the inserted email already...
View Article'Access-Control-Allow-Origin' header in the response must not be the wildcard...
I am try to convert my electron app to full web. when I am running the app from my localhost I get this error:Failed to load https://agrt.herokuapp.com/login: Response to preflight request doesn't pass...
View ArticleHow to resolve CORS error in Node js and Express backend [closed]
I am building a web application using React on the frontend and Express.js on the backend. When I try to make a fetch request from my frontend to the backend API, I get a CORS blocked policy error in...
View ArticleTesting express routes with JEST
I wanted to test my express API endpoints with JEST.Below is my Express API code.routs.ts// Get release notesroutes.get('/release-notes', (req, res) => { request.get({ url:...
View ArticleWeb service response time increased significantly after adding field-level...
QuestionWhat can be the recommended way to profile where the time is going when masking was the only change (e.g. regex compilation, per-field DB/config lookups, encryption/decryption, extra...
View ArticleHow can I prevent slow first-load queries and 504 timeouts in a Node.js +...
I have a Node.js/Express dashboard that reads SLA data from Microsoft Dataverse. Most requests are fast once cached, but wider date ranges such as Quarter, Year, and All-time can take 3–5+ minutes on...
View ArticleWeb service response time increased significantly after adding field-level...
QuestionWhat can be the recommended way to profile where the time is going when masking was the only change (e.g. regex compilation, per-field DB/config lookups, encryption/decryption, extra...
View ArticleIntegrating SEO with react project [closed]
I am working on a React js project and i got a task to integrate SEO with this project. I tried to get some open source and step by step process of integrating seo and how to plug in tags and end...
View ArticleHow to use Mailgun variable in email template?
I am using Mailgun API with nodejs+express to send emails.I want to transition into using templates instead of writing the whole email as the HTML tag in nodejs.The Mailgun documentation shows how to...
View ArticleHow to enable CORS allow-origin header in express server with swagger-ui
My API server doesn't change or overwrite the Access-Control-Allow-Origin header.I have an Angular 2+ application with an Express/Swagger-UI API.The Access-Control-Allow-Origin header in the API cannot...
View ArticleHeroku + Cloudflare completely free SSL
Attempting to get completely free SSL on Heroku using Cloudflares new free Universal SSLRead this article:http://mikecoutermarsh.com/adding-ssl-to-heroku-with-cloudflare/Which seems to suggest its...
View ArticleBest approach to Dockerize a Node.js backend with an API endpoint and scheduler
The API endpoint uses the Express.js package, while the scheduler uses Bree.js.My previous approach was to wrap the scheduler startup code in a function and start the scheduler when the Express server...
View ArticleHow to connect Node Js server with Android Studio app?
I'm trying to establish connection between an android studio and a node js server, but I'm kinda stuck. I pretty sure I've done many things wrong, but my one error message I can start searching for...
View ArticleI am having problem using http-proxy-middleware
I have two servers running in my backend, because of that I have to use the http-proxy-middleware package but I am encountering some problems.This is my code in the frontend which is running on...
View ArticleClass attributes not updating [node.js - express ]
I have some troubles with a .js Object's attribute which is not updating when I ask it to.I'm new in the JavaScript world, so I hope my issue won't be tricky.First of all, this is a part of my Node...
View ArticleWhy and how to put secrets in environment variables in Node.js?
I'm relatively new to Node.js and Express and I was following a guide on adding authentication using JWT to my site found here: Medium. I'm confused by one point of this guide, about using secrets,...
View Articlehttps.request() is giving Error: connect ECONREFUSED 127.0.0.1:443
Hello there,I'm at my wits end I'm struggling I would like to know where I'm going wrongI can't seem to get past this error connect ECONNREFUSED 127.0.0.1:443 something tells me it's something small...
View Articlehow to actually use the data requested using discord oauth2
I am not exactly sure how to go about using/accessing the data requested from a discord oauth2 authentication. I have requested to access the guilds the user is in and the username and avatar of the...
View ArticleHow to configure refresh token with express and react
I am trying to configure a refresh token with cookies.In the backend I have two APIs, login and refresh.The login is working but if I go to the cookies in the browser I don't see any cookie with the...
View Article