Questions tagged as 'node.js'

1
answer

ERROR accessing JSON keys with special character

Good evening, guys! I'm writing a NodeJS that accesses a URL that contains a JSON in that JSON the keys contain special "-" character that is causing error in my application what would be the correct way to access them? Example Error:...
asked by 04.09.2018 / 04:24
0
answers

Insert in loop without repeating data NodeJS + mysql?

I need to enter the DESCRIPTION field in a CATEGORY table; I have my data in JSON format (already on the server); My loop runs the sequence of steps: Checks whether the "category" field exists in the JSON object Make SELECT to see i...
asked by 02.09.2018 / 08:23
0
answers

return to view before executing the route .. nodejs

Good afternoon, how do I get back to the view that fired the route without does it execute there ?? follow below the section ... app.post('/atendimentos/pesquisa', home.loggedIn, function (req, res) { var nome_pesquisa = req.body.cliente...
asked by 30.08.2018 / 17:59
0
answers

Can I save arguments in a variable to move to a function later? [duplicate]

Hello, I was wondering if it was possible to save arguments in a variable to call a function with them later. Try to demonstrate an example: let numeros = (1, 3); function adicionar(a, b) { return a + b; } adicionar(numeros); I want...
asked by 30.08.2018 / 13:01
0
answers

How to publish a Typescript module in NPM?

Hello, folks, I built a Typescript module to use on NodeJS, but I'm having trouble using it. I got to publish, I followed some tutorials that I found, but without success. I open another digital project    npm i xxx-xxx It lowers dependen...
asked by 11.09.2018 / 04:48
0
answers

SigepWeb NodeJS

I was able to generate the code generation and the verifier digit of the label, however the post office asks for a unique pattern for printing and I do not know if sigep-web already provides this in its API or not. link There is the link...
asked by 27.08.2018 / 04:54
1
answer

Return value of a request!

I'm practicing a bit of nodeJS, so I decided to create an application for the temperature query, however I came across a question. How do I return the value of the weather variable: const tempo = () =>{ request('http://apiadvisor.climat...
asked by 23.08.2018 / 02:37
0
answers

Can not read property 'collection' of undefined

Error: TypeError: Cannot read property 'collection' of undefined at Object.findAll (/Users/filipealves/node/crud/db.js:7:17) at /Users/filipealves/node/crud/routes/index.js:6:13 at Layer.handle [as handle_request] (/Users/filipea...
asked by 23.08.2018 / 11:07
0
answers

How to configure the api-query-params lib in Node Express?

There is a library called api-query-params , with which it is possible to perform filters and pagination on a single method, at first it is working perfectly to perform pagination, however I am not having the same result with the filters, look...
asked by 22.08.2018 / 16:00
0
answers

Node module restarting on multiple requests

I'm developing a personal project to do performance testing on a list of sites and for this I'm using the lighthouse modules and chrome-launcher. In my application is being read a list of sites (url) and the requisitions are made to the lighthou...
asked by 23.08.2018 / 22:38