Questions tagged as 'nodejs'

0
answers

set value of an object traversed by ng for, to a ng form in a hidden input in angular 7

I have a problem to pass the value of an object to an input of type hidden in an angular form, to be more exact, I have a modal in which I have a form to update a table, the problem is with NgModels and NgForms managed to send the body to my API...
asked by 21.11.2018 / 21:08
2
answers

"cross-env" is not recognized as an internal or external command, program or batch file executable

I am trying to execute the command: npm run watch to compile the files in laravel 5.6. I'm using laragon that includes Node js 8.9. This is the error script: $ npm run watch > @ watch C:\laragon\www\learning > npm run developm...
asked by 21.11.2018 / 23:15
0
answers

Recover token with json web token and nodejs

Good I have an api made with express but I do not know how to save the token, any help? Controller code that creates the token which works correctly: function login(req, res) { const { name, pass } = req.bo...
asked by 21.11.2018 / 19:10
1
answer

Dialog in console, product of functions in Node.js

I would like to know the reason that this dialogue takes, or why it is shown.    "(node: 16232) DeprecationWarning: collection.count is deprecated, and   will be removed in a future version. Use collection.countDocuments or   collection.estim...
asked by 23.11.2018 / 00:36
1
answer

Create objects with references Node Js and MoongoDB

Hello, I have the following data models in mongo db var mongoose = require("mongoose"); var accountSchema = new mongoose.Schema({ name: String }); module.exports = mongoose.model("Account",accountSchema); A second model var mongoose...
asked by 21.11.2018 / 01:47
0
answers

Node change from publisher to subscriber under conditional statement

I want to subscribe to a topic that sends a geometric message that is being published. But within a node that also publishes in the same topic under one condition. My node publishes a cmd_vel message when an object is near the robot, to tell...
asked by 21.11.2018 / 14:00
0
answers

Problem obtaining a parameter from the url (the ID)

I'm trying to take the id parameter that I'm passing through the url to get the whole json from just the id but by doing console.log it tells me it's undefined but the id is passed correctly by the url only that I can not get, then I have...
asked by 01.12.2018 / 14:14
0
answers

Show JSON Object from MongoDB

I have a problem showing an array of a JSON object from MongoDB. The Ajax request works correctly and the data is displayed well by the console. My problem comes in the view, when I try to show that data in the html and the component cl...
asked by 19.11.2018 / 16:47
0
answers

Traveling data from a query to the BD in Jade does not show them

I have a route where I make a query to the database, to try to send them to view in this way router.get('/all', (req, res, next) => { connection.query('SELECT * FROM users', (err, rows, fields) => { res.render('index', { rows...
asked by 17.11.2018 / 06:17
1
answer

Problem with asynchronism in Node

I'm new to Node ... I have a module that connects to a postgres DB through pg-node. In that I have no problems. My problem is that when calling that module, from another module, and then wanting to use the data that came out of the BD, it says u...
asked by 15.11.2018 / 23:34