Questions tagged as 'node.js'

1
answer

Defining default values to vary with the Pug Engine Template

I'm starting to work with MEAN and use the Pug template engine. I know the same was Jade previously and there have been updates on how to work with it. My problem is that in Jade, and in various places on the internet, I have the informatio...
asked by 20.01.2017 / 02:42
1
answer

Double association with sequelize

I have the following relation with the sequelize // Tasks.js sequelize.models.tasks.belongsTo(sequelize.models.users, { foreignKey: { type: DataTypes.INTEGER, field: 'ASSIGNEE', allowNull: true }, as: 'assignee' }); s...
asked by 08.01.2017 / 14:12
1
answer

How to use the contents of a javascript variable in another js file?

I'm creating my first application with nodejs and I have a question in javascript. In the code below I'm reading a sensor and saving in the variable value every 30 seconds, I wonder if I can use this variable and its value in another js file?...
asked by 06.01.2017 / 19:17
1
answer

Manage urls in a system

I'm in a project where there's the test environment, and the production environment. When I'm developing in test, I use a few different urls for this. I use some amazon services, which are different from production urls. However, it is ver...
asked by 09.12.2016 / 17:21
1
answer

NodeJS no Azure

I made a simple public project in NodeJS API. link However, publishing and accessing the API on AZURE did not respond: ERR_CONNECTION_TIMED_OUT Running place works perfectly. I've done all the possible publishing procedures and the...
asked by 03.02.2017 / 16:49
1
answer

How to get DB value for a variable?

I have the following question: I have a database in mongoDB, I do the search of the data by NodeJS it returns me all right, however I would like to play this search value for a variable, to make a comparison. Type I search the date in DB and wou...
asked by 04.12.2016 / 13:22
1
answer

Socket I.o does not update automatically

Hello, I'm using the Socket i.o and when I send a POST / EnviaTemperatura, it is not automatically updating on my site. What am I doing wrong? Node.js app.post('/EnviaTemperatura', function(req, res){ temperatura = req.body.temp;...
asked by 05.10.2016 / 14:13
1
answer

Undefined value after consultation with the bank

I have the following code: var async = require('async'), pgPromise = require('../utils/pgPromise'); function anyFunction() { var tripItem = []; var tripStartEndTripItem = []; var tripStartEnd = [1,2,3]; async.series({...
asked by 07.09.2016 / 14:18
1
answer

How to ensure api's rest security

I am creating a system using the MEAN Stack and I had a question .. My angled client application makes a request for api ex: POST link If some malicious user finds the api url he could do a post without going through the client of my app...
asked by 08.11.2016 / 02:29
1
answer

Error installing babel npm package in my project

I'm trying to install the babel package in my project. But when you run the command: npm install --save-dev babel-cli , an error occurs in the tar.unpack installation. See the picture: Already tried to update the npm, update the node...
asked by 05.09.2016 / 16:16