Questions tagged as 'nodejs'

1
answer

How can I do a find to search on an ObjectID in mongoose?

For example I have two models in mongoose: var Persona = { nombre: "Luis", carros:{ type: Schema.ObjectId, ref:'Carro' }, apellidos:"Colx Redex" } var Carro = { modelo:"FX-200", velocidad:"300km/h", marca:"Nissan" }...
asked by 08.09.2018 / 22:15
0
answers

Parsing error: Unexpected token = In Firebase

I'm trying to deploy an index.js file in Firebase but I'm getting this error:    129: 41 error Parsing error: Unexpected token = > This is my code : const callSendAPI = async (messageData) => { const url = "https://graph.facebook...
asked by 06.09.2018 / 19:40
1
answer

Problem when creating or starting an ionic project in macos

I'm trying to install ionic on my macbook, and I've had a lot of trouble trying to install NODE and npm, in the end I managed to install everything without any errors, but when I try to start the project, with this command: sudo ionic start io...
asked by 10.09.2018 / 10:04
2
answers

Append to object to another object?

I am trying to make a type of append inside an object, but I would not be knowing what method to use to achieve it. For what I'm looking for, they recommend using an array, but I honestly do not feel like using that method. (When I use db I do n...
asked by 14.09.2018 / 01:23
0
answers

Sort query output in mongoose (find) by two fields

I can not sort the result of a query in mongoose and I do not know if an aggregation function is necessary to achieve that order. I have a column called _id and another column called comment_id (which contains the main _id to reference). This...
asked by 29.08.2018 / 15:53
0
answers

How to obtain data from the customer side with sockets?

Work with sockets now, as follows, I have a gps that is pointing to my server, at the moment I had to make my ip public and assigned a port where the data would arrive: Now on the server side with nodejs I have this: var express = require("exp...
asked by 22.08.2018 / 01:03
0
answers

Proper implementation of javascript Promises Chaining [closed]

I made an implementation of Javascript Promises and I would like you to give me feedback on how I did it. I think I'm not doing it correctly in terms of chainning, also because in the code I have several levels of indentation. They almost look l...
asked by 22.08.2018 / 21:28
0
answers

ERROR in src / providers / af.ts (2,9): error TS2305: Module

I have a problem, to start with npm run electron, I already delete node_module and I gave npm install again and not even that, thank you in advance.     
asked by 02.09.2018 / 03:40
0
answers

How to incorporate a page paging in Vuejs?

I am in the process of learning with this framework ( vue. js ) and I need to find a way to add a page in a table, by which, it should be expanded as more objects are added and then list them in the table and limit the number of items to be disp...
asked by 18.07.2018 / 18:22
0
answers

Subqueries in mongoose

I have a problem when making subqueries in mongoose, I have two collections one place and another material , the place collection has an array of materials ids added by a user . Now what I'm trying to do is to be able to update a plac...
asked by 16.08.2018 / 21:02