Questions tagged as 'node.js'

1
answer

Connection being refused

Following this tutorial of Vedovelli on node with restify and mysql, implemented on the server with pm2. Only after a few days the connection started to be refused You're showing this message: errno: 'ECONNREFUSED', code: 'ECNNREFUSE...
asked by 03.08.2018 / 13:14
1
answer

Lamda functions - How do I loop in AWS-StepFunctions - with Nodejs?

I have a lambda function, F1, in Nodejs whose main purpose is to read the contents of a file that is deposited in S3 through another process. Let's say there are 10 products in this archive. I need to loop through these products to call the F...
asked by 03.08.2018 / 13:50
1
answer

How to make Tyscript read a JSON file that is on disk?

I have a TypeScript (NodeJS-10.6.0) code and need to create a variable that will retrieve the contents of a JSON file. I've tried to import the contents of the file in the following ways: 1. import { orderPayload } = require('../../events/...
asked by 14.08.2018 / 15:17
1
answer

Problems with filter in lib API QUERY PARAMS

I'm using this lib to apply filters api-query-params I need to filter for this entity; 'use strict' const mongoose = require('mongoose'); const Schema = mongoose.Schema; const schema = new Schema({ id: { type: String,...
asked by 17.08.2018 / 18:27
1
answer

Select using an array?

I have the following array: var arr = ['A', 'B', 'C'...]; And in my database I have the categoria column where the values are saved in the following way: 'A,B,C...' , how could I make a SELECT by taking each category of...
asked by 07.07.2018 / 22:48
1
answer

Clicking on a button and get the row values of a table

I'm doing a project in nodejs / javascript and I'm trying to get the values that are in the row of a table. When clicking on the button on this line will get me these values and anger sends them to another page. I basically want to get the ce...
asked by 05.07.2018 / 23:40
1
answer

Import functions from another file (node.js)

I have a bot.js file that would be my "main" project and inside the same folder where the bot.js is, I have Call.js and Somar.js which are just functions [call ()] and [add () ]. Is it possible to "import" these functions into bot.js and just us...
asked by 05.07.2018 / 20:00
1
answer

Read serial port data with javascript, node

Good afternoon, I need a framework, or some alternative to read data from a COM5 usb port, with bound 115200. Has anyone ever used any type of tool? I have seen many in java, c ++ etc. I'm working with a sensor libelium waspmote, ac meter, th...
asked by 28.06.2018 / 17:31
1
answer

Autoload of models in Mongoose

I have an API in NodeJS where I created a file to be my datasource, in this file I make the autoload of my models reading the files of my app and for each one I import into the sequelize. The code is this: import Sequelize from 'sequelize'; im...
asked by 04.06.2018 / 21:33
1
answer

Push Notification with Socket.io

I made a small application with node + socket.io to send notification. by adding the code below on the client page, the notification is displayed in the "messagebox" div. <script src="http://code.jquery.com/jquery-1.7.1.min.js"></scri...
asked by 30.05.2018 / 14:26