Questions tagged as 'node.js'

2
answers

How does NodeJS manage package.json in subfolders?

How does NodeJS manage packages.json in sub-folders? You have your normal application but have sub-modules that you want to have your own dependencies, how does Node manage it? Does it create another node_modules and put all files back...
asked by 27.11.2015 / 16:56
1
answer

installation nodeJs in Ubuntu

In Ubuntu the Node.JS package was renamed to nodejs because there was already another node package. How do I make npm understand that nodejs is already installed on the system, but the name of the different? I've gotten the error:   ...
asked by 30.08.2017 / 16:27
1
answer

How to find the server port that responded to the request

I'm using the link to create a load balancer in NodeJS, in this module has the event   proxy.on('proxyRes', function (res) { .. }); Within this event, I would like to get the server port that answered the request by the res parame...
asked by 18.03.2014 / 21:45
1
answer

How to make a query with Node.js and MySQL

Hello, I'm starting with Node.js and MySQL , and I have some problems right now. Well, I have a table called users, and I need to make the data request for verification, for example: My site has a registration form, but it needs to...
asked by 11.05.2015 / 03:22
1
answer

Stream data with socket.io

Hello, I'm streaming data from the bank in this way, I know it's too overloaded by the client's browser, would I have another way to stream it without loading it? var express = require('express'), app = express(), session = require...
asked by 02.01.2015 / 13:25
1
answer

synchronize two screens

I'm starting to develop a rails calendar system and I have the following problem: Let's say I have two screens open in the calendar: 1.1 - First screen is opened on the doctor's computer. 1.2 - Second screen is opened on the secretary...
asked by 08.04.2015 / 14:47
1
answer

server-side timer?

I'm doing a question game in PHP, the user will have 15 seconds to answer each question, how to prevent the user from changing the timer via inspect element and add seconds? Just adding details, it is impractical to let the user change the ti...
asked by 03.03.2016 / 20:26
3
answers

How to remove string-specific word?

I have an input where the user can insert his own site, and I insert http: // when writing to db, but I would like to treat it so that if there is already this tag in the input it does not insert again, since the user updates he re-inserted the...
asked by 09.06.2017 / 14:44
2
answers

Doubt with syntax

Simple doubts. Usually I see this syntax: require('../lib/dbconnect')(config); But I do not understand why I use these parentheses in this way. (....)(....); Can anyone explain what it's all about?     
asked by 15.10.2015 / 15:06
2
answers

Nodemailer sends email but recipient does not receive it (hostgator server)

I have an e-mail server on the hostgator and an account on it. I need to use nodemailer to send messages to my clients from this account. For this I need to manually configure with these instructions from the hostgator I'vetestedallpossiblec...
asked by 16.04.2016 / 19:53