Questions tagged as 'node.js'

0
answers

Is there an environment for Nodejs cloud development?

Study at a college that has not yet ratified the nodejs on the equipment. However, where can I find a cloud environment to develop my nodejs and expression applications?     
asked by 06.12.2017 / 15:31
1
answer

Change Text Color Discord [BOT]

I'm trying to change the color of the text after doing a Discord chat cleanup. Example: !cclear    (CHAT SUCCESSFULLY CLEANNED!) < - Appears in green color. My code so far: const Discord = require('discord.js'); const bot = new Dis...
asked by 09.12.2017 / 02:52
1
answer

O generates error Can not set headers after they are sent, is running 2 times

When the validator returns an error to API to, when I do not have a return to an api error it works normal. function alterar(req,res){ validator.validaValores(req.body,(err,data) => { if(err){ console.l...
asked by 04.12.2017 / 13:29
1
answer

How to deploy Angular and Java in Heroku?

I have a web application in AngularJS that communicates with a Java backend. I would like a lodging and I ended up seeing about Heroku. Is it possible for me to buy a single plan (for example $ 7) and host both applications? Or will I have to bu...
asked by 03.12.2017 / 00:09
1
answer

How to print directly without opening the browser dialog?

I am developing a web system where I need to print a label and a non-tax receipt after submitting a certain form. To perform this action, I have two printers: Non-Fiscal Matrix Printer MP-20 MI - For non-tax coupon; Zebra Thermal Printer T...
asked by 19.09.2016 / 22:49
1
answer

How to use DataTable Plugin (Jquery) with Node.js

I'm working with node and express and need to populate a table with information that comes from a SQL database. I run my code on page get like this: app.get('/Home.ejs', (req, resp) => { SQL_Server(Seleciona, (rec) => { resp....
asked by 24.11.2017 / 16:40
0
answers

Generate file with nodejs

I have the following problem, I have an xml to json converter in javascript and this converter saves the converted object to a variable. I need to adapt this code to enable writing the file from the nodejs, but so far I have not been able to sol...
asked by 29.11.2017 / 14:26
0
answers

The requested resource does not support http method

My code: var data = JSON.stringify(orderNo) options.path = "/1/sales?merchantOrderId=" + orderNo options.method = 'GET'; console.log(options) var req = https.request(options, function (res) {...
asked by 17.11.2017 / 13:04
1
answer

how to index an object numerically in Node.js?

I'm getting a .csv like this: animal, branco animal, preto inseto, branco inseto, preto animal, cinza I want to be able to use this mass of data this way: // obj = { animal : [branco, preto, cinza] , inseto:[branco, preto]} BUT that I...
asked by 01.12.2017 / 03:20
1
answer

Query to get date difference

I would like to know how I can make a query of this type in MongoDB with date difference and taking the last record in a date range. SELECT *, DATEDIFF(NOW(),DATAHORA) AS DIAS FROM TBLTRANSFERS WHERE IDTRANSFER IN (SELECT MAX(IDTRANSF...
asked by 14.11.2017 / 15:41