Questions tagged as 'node.js'

1
answer

How to configure paging method on Node Express?

I have my paging method working perfectly with this URL: http://localhost:3000/menuspage See the code below; exports.list_all_dataProviders = async (req, res) => { const { filter, skip, limit, sort, projection } = aqp(req...
asked by 16.08.2018 / 15:37
1
answer

Error running npm install

I just installed linux deepin on my pc, I installed node.js 10.0.6 together with npm 6.0.4. When I run npm install , it gives the error, so I executed the following command: npm audit fix --force and got the following result: npm...
asked by 19.08.2018 / 15:17
1
answer

Add data per month using mongoose

Hello! I need to aggregate data per month to use later to make charts. I'm using Mongoose as ODM and the following scheme: module.exports = mongoose.model('atendimento', { id: String, id_atendimento: { type: Number, default: 0 }, i...
asked by 06.08.2018 / 18:55
1
answer

NPM - save x save-exact x shrinkwrap

I am doubtful between the commands below, when to use and what is the difference between them? How important is -save-exact exactly? When and how to use each? npm i my-pack --save npm i my-pack --save-exact npm shrinkwrap     
asked by 05.08.2018 / 17:28
1
answer

Javascript IF return content

Good morning everyone, I have a certain problem, if it was in pure Javascript I would have done using if and else without problems, as I did in another file and it worked! Basically the HTML file (with AngularJS): <d...
asked by 30.08.2018 / 14:26
1
answer

Get attribute within an array in MongoDB

Hello, friends. Good night! I'm having a problem in developing an api, I need to query some attributes within an array of a Schema in MongoDB to add them to an email in a request. Can anyone help me? follows the Schema model below: I need...
asked by 31.07.2018 / 02:46
1
answer

Error escaping a url in js express from a middleware

I have a problem escaping a Url validation of Token . I am using lib jwt (jsonwebtoken) to restrict the access to request of my api, however I want to leave url /imagem/:parametro without validation by token. Because today when I...
asked by 01.11.2018 / 20:59
1
answer

How to use async and await in NodeJs

I'm trying to learn how to use async await but, I'm missing something and need help. My method works as expected with Promise see: import express from 'express'; import conn from '../models/connection'; const c = conn; class ClientRoutes { ....
asked by 17.07.2018 / 21:37
2
answers

Error Node App React Native

I can not create new react native project Whenever I run the command: react-native init MyProject it can not finish creating the project. The following image:     
asked by 10.07.2018 / 03:52
1
answer

Problems connecting Node Express in Mysql

I know that my project is correct that there is nothing wrong, I think the problem is my newly installed bank, how can I solve this problem? Unhandled rejection SequelizeConnectionError: Client does not support authentication protocol requeste...
asked by 30.07.2018 / 12:48