Questions tagged as 'node.js'

1
answer

Questions about indexes for Boolean fields - MongoDB

I have documents with boolean fields in a Mongo collection. To index these fields, is it better for their values to be Number (0 or 1) or does it make no difference if they are Boolean? I have received some "slow query" alerts in the search by u...
asked by 28.12.2017 / 23:04
1
answer

.NET application C # express style NodeJS

But for a few features I'd like my project to respond to some simple HTTP Rest requests. As the project will handle COM + and other things, I will do it in C #. The issue is, I do not want to have to deal with IIS and wanted something simpler...
asked by 12.12.2017 / 20:52
1
answer

Error executing POST method

I'm facing a problem with the POST method, when I trigger this method it normally inserts into the database, but the application (node index.js) is terminated, at the command prompt I get this error: Error [ERR_HTTP_HEADERS_SENT]: Can not se...
asked by 06.12.2017 / 18:51
1
answer

Error: Most Middleware in app nodejs

Running nodejs application. I received this error: I ran my application with the command node app.js Versions: node: 8.9.2 npm: 5.5.1 express: 4.15.5 App.jscode:/***Moduledependencies.*/varexpress=require('express');varroutes...
asked by 07.12.2017 / 00:05
1
answer

For service node from within js

Well, I need to finalize a node process from within js itself. What happens that I have a cron that executes a node meu_arquivo.js command and needs within this meu_arquivo.js to end the node so that it is not open. How to do th...
asked by 26.01.2018 / 14:17
1
answer

Update array of objects in MongoDB with Node?

Good evening guys. I'm developing a simple chatbot for testing purposes, but I came across a problem. I have a user, when starting a conversation, a bot is generated, and this bot has an array of messages and responses. I want every time I se...
asked by 26.02.2018 / 23:46
1
answer

How do I go back to old versions of nodejs by npm?

I need to go Node.js version 5.10.0 in order to use Firebase Hosting     
asked by 12.01.2018 / 16:05
1
answer

How to improve select performance

I have to use firebird, but I do not get very well with the database, I made the select as follows: select first 5 skip ((1 - 1) * 10) distinct PRO.CODIGO, PRO.NIVEL_INTERESSE, PRO.DATA_RETORNO, PRO.RESPONSAVEL_PROSPECT, PRO.EMPRESA_PROSP...
asked by 23.11.2017 / 17:13
1
answer

NodeJS - Wait for 'for' to execute all 'pool.query' until the end

I have a small problem, and no matter how hard I tried to find a solution, I can not think of an excellent one. So I come to ask for your help! So here's the thing: I'm currently developing a betting site (from CSGO game skins) and my problem...
asked by 30.10.2017 / 18:25
1
answer

Listen to messages with multiple clients (pub / sub)

If I want to have multiple users and channels, do I need to create a client in redis (or whatever pub / sub used) to subscribe to the channel? and how would you get the messages? I'm thinking so, redis-pub / sub clients would need to be at the l...
asked by 24.10.2017 / 05:04