Questions tagged as 'node.js'

0
answers

How to redirect to a page with node js?

I can do this more with a route, but I want to do something like: app.redirect(url); and not: app.get('/', function(req, res) { res.redirect(url); }); Can anyone help me? vlw, and obgd!     
asked by 18.03.2016 / 18:21
1
answer

Relationship in MongoDB

Good afternoon, I'm in need of help from someone who has experience with MongoDB to get me out of a doubt. I'm studying about MongoDB and I came across the following problem: I have 2 Collections: Customers and Users Each client has its...
asked by 14.03.2016 / 18:46
0
answers

Reactive Programming With MEAN stack

I'm thinking of starting to develop a social network similar to that of instagram, for learning purposes, using MEAN stack. I thought about my models: User: var mongoose = require('mongoose'); module.exports = mongoose.model('User', {...
asked by 01.03.2016 / 05:02
0
answers

Doubt with FindOne in AngularJS using MongoJS error when searching

Hello, I'm trying to do a search on the bank with this code using the mongojs findOne, follow code: app.get('/detalhesContato/:id', function(req, res){ var id = req.params.id; console.log(id); db.contatos.findOne({_id: mongojs.Obj...
asked by 05.02.2016 / 21:09
0
answers

"io is not defined" error socket.io

Folks, this error is happening to me when using socket.io: "io is not defined". Already link the CDN socket.io and locally; I have already used and "deprecated" Express and nothing. The interesting thing is that when I open the source in the...
asked by 23.12.2015 / 23:43
0
answers

MySQL query on node ignoring difference condition

I have had a peculiar problem while changing my Node.JS server to certain MySQL queries. I have the following code that works normally in MySQL Workbench: SELECT id, nome FROM 'tabela' WHERE categoria <> 2; But in node-mysql the query...
asked by 12.11.2015 / 16:32
0
answers

How to install and configure Markdown in the Meteor along with React? [closed]

I'm learning React along with Meteor, so I've seen React's official documentation using Markdown as a good practice against XSS. I downloaded it on the meteor with "meteor add markdown" but apparently I would have to set up something to run alon...
asked by 31.12.2015 / 21:01
0
answers

Multiple websocket connections

I have a script that makes 4 or 10 connections to a game after I click on the 'run bots' button, I tried to create a 'run bots2' button to create 4/10 more connections with the server but without closing the first but always the first ones are c...
asked by 03.12.2015 / 06:36
1
answer

Difference of using module and own libraries, NodeJS

I'm starting at nodejs, it's all "new" and I came across this conflict. There are modules (I call modules, I do not know if it's right) ready etc ... though I have libraries like CryptoJS that have modules for NodeJS and have your JavaScrip...
asked by 31.10.2015 / 23:29
0
answers

Server nodejs to accept connections after a running time

I made an application to control simultaneous logins, at start everything works perfectly, but after a few hours I can no longer connect to the server the client returns me the following error net :: ERR_CONNECTION_TIMED_OUT and on the server si...
asked by 16.11.2015 / 17:31