Questions tagged [nodejs-server]
405 questions
0
votes
1 answer
nodejs express force to stay on http
Working on a NodeJs application and I'd like to trick the browser so that to keep http, latest version of the browser keep redirecting this to https.
I know that its not recommended but its only for PoC so no major issue having unsecured…

el.severo
- 2,202
- 6
- 31
- 62
0
votes
1 answer
Busboy sending response back before reading file length and file data? i am uploading single file
module.exports.upload = function (req, res) {
fileName = path.basename(req.query.fileName);
var fileExtn = path.extname(req.query.fileName);
console.log("fileName " + fileName);
console.log("fileExtn " + fileExtn);
var fileCheckResponse =…

Shakti
- 3
- 3
0
votes
0 answers
Electron as a WebApplication
So I basically made an Electron App. Now I want to port my Electron App to a server. I imagined it like a backend Electron Server, which runs a new instance of the application and "casts the interface through the web". I'm still a student and don't…

Ven
- 114
- 5
0
votes
1 answer
loopback nodejs server not starting
I have project with nodejs loopback 3.x version and I am recently turned dev in nodejs. I have written the models, server aspects (server.js, server/root.js) etc. Following are the dependencies:
"dependencies" : {
"@types/async": "2.0.40",
…

Ganesh Shenoy
- 619
- 1
- 10
- 28
0
votes
0 answers
NodeJS using Cluster to run a function in parallel
My server receives a list base64 image eg [img1,img2....] at an endpoint.
I have function getPoses(img) that takes an image and returns an object back.
I want to be able to map the images to getPoses() and get the object back for each image in…

Sandeep Thapa
- 85
- 8
0
votes
1 answer
Remove subroute from express middleware
I have NodeJs App in which i am using a middleware for authorization which is as follows:-
app.use('/api', authorizeMiddleWare, routes);
and there is routes which consists of all the routes which is suppose as follows:-
router.use('/route1',…

Dhiresh Budhiraja
- 67
- 1
- 9
0
votes
1 answer
How to further group object after replaceRoot in mongodb
{
"169v55": [
{
"code": "2001",
"active": true,
"delist": false
}
],
"SLO1019jkf": [
{
"code": "MOUNTY2026",
"active": false,
"delist": false,
"createdAt":…

Rakesh
- 178
- 10
0
votes
1 answer
Heroku server error 503 in nodejs express api
When I run my nodeJs API on localhost is works perfect but when in uploaded it on server (Heroku) then it gives server 503 error.

Aman Gupta
- 140
- 2
- 10
0
votes
1 answer
Mongodb add fields from One collection to another collection based on few conditions for large number of documents
I ran into the below situation where I need to update large number of collections very frequently.
I have a collections like below
coll1
{
"identification_id" : String,
"name" : String,
"mobile_number" : Number,
"location" : String,
…

Polaiah Bodeddula
- 158
- 11
0
votes
1 answer
call external API from aws lambda and get respose as callback in lambda funtion
I'm trying to call external API inside aws Lambda function using node request Module. so far I'm success of calling API and get the data within lambda execution. only problem i'm having is getting my userInfo data with response.even my userInfo has…

CrazyCoder
- 153
- 3
- 17
0
votes
0 answers
How to get cookie on new connection on server nodejs
I'm currently using node js and express to build a webapp.
I want to check when a user changes the page to check if he has a special cookie.
For this i tried :
server.on('request', (req, res)=>{`
console.log(req)
console.log(req.cookies)
…

johannb75
- 357
- 5
- 16
0
votes
2 answers
I am returning a Promise Object and unable to get actual object- nodej s
Code below is returning a Promise Object in form of Promise{object}. I am unable to get it in actual object
var msg_bo = new msgBO();
var msg = JSON.parse(req.body.message);
var cnf;
uploadFile()
function upload(){
return new…

Amaan Imtiyaz
- 254
- 6
- 16
0
votes
1 answer
It doesn't show me the data when I get the request through the postman, but with books it worked
app.get('/usuarios',async function(req,res){
var queryResult=await query(`select * from Usuarios`);
console.log(queryResult);
res.status(200).json(queryResult);
});
CREATE TABLE Libros
(
id_libro VARCHAR(10) NOT…

Javier
- 11
- 1
- 4
0
votes
1 answer
Sequelize Query Execution In Loop
Below iam calling addUpdateDailyLeads with an array like
[{
"yyyymmdd": "20191124",
"admin_login":"rasheed.s",
"category":"PO",
"amount":10,
"office_id":10000,
"new_leads_attempted":10
},
{
"yyyymmdd": "20191124",
…

rasheed sk
- 3
- 6
0
votes
2 answers
cannot reach a file on server though I exposed using express
In my project I need to store some text files dynamically and end user should be able to download them from browser. I know the best way is using object store like MINIO or S3 but unfortunately the only way I have is to use in memory storage. So…

Learner
- 1,686
- 4
- 19
- 38