Questions tagged as 'nodejs'

2
answers

"Can not POST" in node.js and postman

It happens that I have this code, where I try to pass by the user parameter and password using as a postman tool, I'm honestly new to this so I do not know if I'm doing well or the code is wrong since I get this error in postman app.post...
asked by 05.09.2018 / 19:23
1
answer

Manipulate DOM with Object Oriented Programming

I am trying to implement the OOP to manipulate the DOM but there are certain things that I do not know where to place, for example the addEventListeners, a specific case that I am facing is, I have created an object that works with some elements...
asked by 31.01.2018 / 03:55
1
answer

Automatically reload files in NodeJS

I am working on a project with NodeJS , and I just realized that I must restart the server every time I make my changes, is there any way to avoid this? I am working with NodeJS 6.10 , express 4.13 , gulp 3.9 ,...
asked by 04.07.2017 / 16:06
2
answers

copy the value of a variable does not work in nodejs

My function is: var copia; objBD.query('select max(ID_U) AS max_id from usuario ', function(err, rows, fields) { copia=rows[0].max_id; console.log(rows[0].max_id); }); console.log(copia); variable copia shows the value u...
asked by 30.09.2016 / 14:05
1
answer

As I declare an attribute of type Date in Typescript (Angular 6)

I am using NodeJS + Angular6 to make a web application and I have a model called "Employee". My problem is that I have a file called "empleadoModel.ts" that has the code: //Importamos el archivo que necesitamos import { tipoEmpleadoModel } fro...
asked by 19.09.2018 / 03:52
1
answer

Take data out of a function

Good, I need to get the variable "users" of this function and the for loop, I thought about using promises but I'm new with that and I can not find the round var ids = [ "RtSG7NApoda9ycDRd7vm", "TnT9XOXnkD1Ra5ROJERR", "55fAOlOlej...
asked by 23.01.2018 / 22:04
2
answers

join two arrangements based on a property

I have two arrangements this way array1=[{fecha:"2017-01-01", valor:12}, {fecha:"2017-01-02", valor:3 }]; array2 = [{fecha:"2017-01-01", valor:10}, {fecha:"2017-01-03", valor:15 }]; and I want to form a third arrangement from these two by s...
asked by 11.04.2017 / 23:28
4
answers

Error in ES6: "is not a function"

How to call a method (from another) that are in the same class in NodeJS? class Usuario{ static foo(){ let a = this.bar(); } bar(){ return true; } } Usuario.foo(); I...
asked by 10.04.2017 / 22:36
1
answer

response from nodejs does not match the result of the ajax request using formidable

Hi, I'm uploading a file to nodejs with the formidable module and everything is fine, the file is saved in the directory I have indicated and such, but the response I receive on the page tells me that has not been found no file to upload but...
asked by 17.12.2018 / 11:45
2
answers

Warning from Nodejs Mongoose

This warning appears on the console:    (node: 5627) DeprecationWarning: Mongoose: mpromise (mongoose's default promise library) is deprecated, plug in your own promise library instead: link I tried everything so that it does not appear...
asked by 16.07.2016 / 20:48