All Questions
77,761
questions
-2
votes
0
answers
21
views
Why res.clearCookie() is not working after deploying to vercel?
First of all, everything works fine when running on localhost.
However, after deploying the app to Vercel when the user tries to log out it should clear cookies with res.clearCookie() but it doesn't ...
0
votes
0
answers
14
views
Aggregate vs Populate methods when to use one in nodejs Mongose
I am creating asset managment tool for warehouse and I have Warehouse , Asset, Category models. I want to get the overall stats of each warehouse like , total assets and how many of them is active or ...
0
votes
1
answer
21
views
Ways to create a login using nodejs
So i am learning nodejs i am trying to create a login
here what I made so far it works
it connects to mongodb and check if the field if same then changing the allow variable to true
any ways to create ...
-2
votes
0
answers
20
views
Server is started successfully but getapi is not loading in nodesjs [closed]
I am working on an Express.js application and encountered an issue with routing. Here is what I have done so far:
Controller:
exports.dummyLink = (req, res) => {
res.send("this is your dummy ...
0
votes
0
answers
9
views
IIS Reverse Proxy with NextJS + NodeJS API
I have an NextJS website running on a Windows Server on port 3000. I've setted the URL Rewrite to redirect all the requests to port 3000 on the server and everything works fine, the Frontend works ...
0
votes
0
answers
29
views
How to properly package a Node.js and React app stripping the container of all unneeded files?
I have a Node.js backend that serves up the React frontend (later I can do CDN probably) and for now, I plan on disallowing CORS so React must talk to my Node.js backend only. The prototype for this ...
0
votes
0
answers
12
views
Ngxin does not return real ipv4 behind cloudlfare (nginx+express+cloudflare)
I want to get ipv4 of clients instead of ipv6
And I use express in nodejs and my domain behind cloudflare
This is my nginx:
server {
server_name xxx.xxx.xxx www.xxx.xxx.xxx;
# cloudflare
...
0
votes
0
answers
27
views
CORS error with deploying an express js server with vercel
Followed the instructions here to run an express server but I'm dealing with CORS errors when calling the backend via my next js app.
How can I make this work? Suggestions for alternate deployment ...
0
votes
1
answer
37
views
Getting 404 AxiosError: Request failed with status code 404
Could you please help me to solve the problem with the routes.
In result I have the next code:
// server/index.js
// server/index.js
const express = require('express');
const bodyParser = require('...
0
votes
0
answers
19
views
Shopify Customer Account API: "client_id invalid" Error on Authorization Request
I'm trying to implement the Shopify Customer Account API following the Shopify documentation here. I'm currently working on the authorization step, where I need to redirect a customer to the login ...
-1
votes
0
answers
20
views
Uncaught SyntaxError: Unexpected token '<' - swagger
I have included swagger in express and deployed on vercel. Swagger is working fine locaally but giving Uncaught SyntaxError: Unexpected token '<' in browser console when i deploy app to vercel. ...
0
votes
0
answers
22
views
Delayed and incorrect updates from react context to backend
I am creating a food ordering application as project. Here, user can add items from a single restaurant only. If they tried adding items from another restaurant too, they will be shown an alert ...
0
votes
0
answers
29
views
FFMPEG - Error during conversion: Input stream error: Status code: 403
const express = require('express');
const ytdl = require('ytdl-core');
const ffmpeg = require('fluent-ffmpeg');
const ffmpegStatic = require('ffmpeg-static');
const app = express();
app.use(express....
-2
votes
2
answers
33
views
Can i make a flexible function that can get * from different tables? [duplicate]
I am trying to create a function that can select from different tables in mysql
My Function
async function getOne(table, table_parameter, parameter) {
const result = await pool.query(
`SELECT * ...
0
votes
0
answers
23
views
Efficiently Remove and Replace Outdated Products in MongoDB with Envato API in Node.js
I have around 200,000 products in my MongoDB database. I need to write a script to remove products that are no longer available on Envato and replace them with new ones. I've written the following ...