Questions tagged [nodejs-server]

405 questions
0
votes
0 answers

NodeJS deployment to A2Hosting subdomain?

Long story short, my buddy has an A2 account (hosting his main app on PHP). I wanted to get my hands dirty with Node (particularly the deployment process) and he said I could use his hosting so I've created a subdomain. I've got the subdomain setup…
shenn
  • 859
  • 4
  • 17
  • 47
0
votes
1 answer

Nodejs function with parameter and callback not working

I am writing an api to get employee by id but the issue I am having is that the controller calls another function In the service and passes a parameter and callback to that function. But when the function calls the callback, I am getting an error.…
zee123
  • 73
  • 1
  • 9
0
votes
1 answer

Restructure json based on actual and expected data

I want to restructure json based on original json data and the expected json data. If you look closely in the original json data I have country outside of the Male/Female attributes. I would want the country module to be inside the Male/ Female…
Eva
  • 109
  • 9
0
votes
2 answers

Regex to add a word before an existing word in node

Appreciate any help to write a nodejs regex. First search for the exact words "ChildBucketOne" and "ChildBucketTwo" and add exact word ParentBucket before every occurence of ChildBucketOne or/and ChildBucketTwo. I am trying to use one regex. Input1:…
0
votes
1 answer

Read files from inout dir, apply the regex, write all files to output dir all at once

I have two folders, input and output folder with many text files in the below format. How do I read all the files from the input folder,run the regex and write all the updated files to another output folder?I am using nodejs. Input:…
Eva
  • 109
  • 9
0
votes
2 answers

How to get value in async function?

I tried two function in(async function,normal function)in node js.normal function its sucessfully return value.but async function its cant return value.How to fix it normal function index.js var sample_data = require('./product') const data =…
smith hari
  • 437
  • 1
  • 11
  • 22
0
votes
1 answer

How to Connect mongodb in node js?

I tried to connect mongodb in node js.but its throwing this type error. Error: getaddrinfo ENOTFOUND mongodb mongodb:27017 How to fix it.any one can give me solution index.js const MongoClie nt = require('mongodb').MongoClient; var ObjectId =…
smith hari
  • 437
  • 1
  • 11
  • 22
0
votes
1 answer

difference between call back function and normal function using node js

I implement callback function in node js. but I have doubt in callback function.I tried two function in node js one callback function and another normal function.both function i tried to run its given same result.I do no any one explain my code. …
smith hari
  • 437
  • 1
  • 11
  • 22
0
votes
1 answer

how to redis cache set and get properly used in nodejs?

I tried node.js crud operation using mongodb and also stored in redis cache. First time I tried to run get method to get data from db and second time I run the get method. It got data from cache but I tried to delete the data in the table and…
smith hari
  • 437
  • 1
  • 11
  • 22
0
votes
3 answers

How to get to be return and print in outside function using node js

I tried one simple function in node js and pass data to one file on to another file.but its throwing undefined.how to solve it in node js fun.js function Get_Value() { client.get('products', function(err,results) { return results …
smith hari
  • 437
  • 1
  • 11
  • 22
0
votes
1 answer

how to jwt token verify using nodejs

how to implement jwt verify token implement in node js.I already tried but its not showing error but its showing undefined.How to solve this issue. auth.py function jwtAccessAuthCheck(accessToken) { if(accessToken) { …
smith hari
  • 437
  • 1
  • 11
  • 22
0
votes
1 answer

Unable to register node js app in jhipster gateway

I'm trying to register the node js application into Jhipster gateway by adding as zuul routes in the yml file. As you are aware, the node js application does not have the context path. Hence, it overrides the gateway url. Please help how to register…
Developer404
  • 5,716
  • 16
  • 64
  • 102
0
votes
1 answer

Nodejs mongoose sub sub document search

I have schema like const propertiesSchema = new Schema({ name: { type: String, required: true }, shortDescription: String, totalArea: String, address: { type: mongoose.Schema.Types.ObjectId, ref:…
0
votes
0 answers

Node JS and Express is mixing processing

I am new to this world of NodeJS and I have a question about the processing of the JS node with the use of express ... Problem: I am running a routine that I created to compile data from 2 api of 2 sectors and in the routine I make the data come…
0
votes
1 answer

Angular sending a request to node api

In my angular app, I send a post request to node API with JSON data object, but it doesn't work as intended. In the request payload, the JSON data object is not shown. When i send a JSON string by using JSON.stringify(auth) it's shown in the…
Duleep
  • 1
  • 6