94,903 questions
- Bountied 0
- Unanswered
- Frequent
- Score
- Trending
- Week
- Month
- Unanswered (my tags)
0
votes
1
answer
32
views
sqlite timezone change UTC to asia/kolkata
I am creating a crud application using Node JS, Express JS & SQLite database. For every database insertion i am using a column 'created_at' to insert current timestamp. But according to my ...
2
votes
1
answer
63
views
Is it possible in Node to wait for a success/error from a net.socket operation before sending an Express response?
I apologize if this is impossible, unadvisable, or answered elsewhere, but I have spent a couple days trying to find an answer as well as changing/testing the code every way I could think of without ...
0
votes
1
answer
69
views
__dirname is not defined when updating user profile with file upload
I am building a Node.js application and trying to update a profile with file upload functionality using Multer. When I try to delete the old profile picture then I get this error:
ReferenceError: ...
-1
votes
0
answers
45
views
Node.js gRPC: How to pass authenticated user data from Interceptor to Method Handler?
I am currently migrating my internal service communication from REST (Express.js) to gRPC in a Node.js environment.
Background (The Express way): In my previous Express.js setup, I used middleware to ...
1
vote
1
answer
54
views
How do I specify that CN=<container_name> and localhost at the same time for openssl self signed certificates between postgres and express?
Postgres is running inside a docker container named postgres_server.development.ch_api
Express is running inside another docker container named express_server.development.ch_api
I am trying to setup ...
0
votes
1
answer
44
views
SendGrid email content sometimes renders in wrong format using Node.js + Express (Dynamic Templates & HTML)
Tech stack
Node.js
Express.js
@sendgrid/mail
SendGrid (Dynamic Templates and HTML templates)
Sometimes, emails sent via SendGrid are rendered in an incorrect or broken format (layout issues, missing ...
2
votes
1
answer
52
views
Mongoose Model.save() not working inside a loop
I'm working on an Express controller to update product's inventories when saving an order. Below is the code to recalculate sold & sellable amount of a product.
for (const lineItem of order....
1
vote
1
answer
40
views
In the header "Content-Type: application/json; charset=utf-8", do spaces after colon matter for express?
I'm currently learning Node and express and ran into this recently. If I put spaces after the colon in my header, the request body in node for POST shows up as undefined. But if I remove spaces, then ...
Advice
0
votes
2
replies
46
views
How to design profile view email notifications using Node.js, Bull queue and Redis?
I have a social networking site where people connect, meet and build network. User created their profile based on there interest. Users can visit others people profile and send connection request to ...
Best practices
0
votes
1
replies
64
views
Node.js Express v5 generate sitemap with all registered routes
I need some help... I have code like below:
main/index.js
const express = require('express');
const router = express.Router();
router.get('/', (req, res) => {});
router.get('/p1', (req, res) => {...
1
vote
1
answer
95
views
Can AbortController be used with Fetch Post requests without automatically triggering a close event?
Question: Is it possible to use AbortController with POST requests without immediately triggering a 'close' event on the server? If not is there a more appropriate tool / method to cancel post ...
Best practices
0
votes
0
replies
66
views
Best approach to dockerize Nodejs Backend with API endpoint and scheduler
The API endpoint is using the Express.js package while the scheduler is using the bree.js.
The previous approach is to wrap the scheduler starting program into a function and start the scheduler when ...
Best practices
0
votes
0
replies
40
views
How to implement email verification using Express JS with React native expo?
I am planning to build a project using an Express JS REST API with React native. I am wondering how email verification is usually handled with this kind of stack.
A flow is:
User registers with ...
1
vote
1
answer
78
views
How does the express session know that I altered the session property?
I'm trying to understand express-session, and I'm still new to Express.
From the Express docs, I learned that when I write:
app.use(middleware1);
app.use(middleware2);
The middleware functions are ...
-1
votes
0
answers
60
views
I have a cookies production issue that I can't login on iphone and also it doesn't appear at all in production server
I'm trying to make users to be able to login using their iphone
also I don't receive any cookies in production! I don't know if it is something for security.
export const loginUserController = async (...