Questions tagged as 'nodejs'

1
answer

when running the route the node sends me this message: Error: Can not set headers after they are sent

When accessing the route you specify, the files that I have in the public folder are not loaded, only some are loaded and in the nodejs console you send me the following message: Error: Can't set headers after they are sent. at SendStream...
asked by 29.05.2017 / 00:24
1
answer

How to compile only the modified files in gulp.watch

I have a typescript project and I'm using gulp as task manager . I want the gulp watch task to wait for the source code to be modified and recompile it, but since the source code is very long and it is divided into several files, I want...
asked by 07.08.2017 / 19:51
1
answer

Problems with CORS nodejs and Angular

I'm doing a webapp through the MEAN stack. The fact is that now I have developed a method to register objects in the database, but when I execute it, it is an error:    Response for preflight has invalid HTTP status code 404 I've been doi...
asked by 17.04.2017 / 14:47
2
answers

Require in nodejs instance a new class

I need to call a method of a class which should not be instantiated again, since it causes an error. In main.js: var telegram = require('./telegram.js'); telegram.hello(); In telegram.js const bot = new TelegramBot(token, {polling: tru...
asked by 05.08.2017 / 10:37
0
answers

Query about socket.io and pub sub redis [closed]

I'm doing a bot using socket.io and pub sub with redis (I know it's not necessary but I'm using it for other things as well), the problem is that it bounces repeated data. This is the script that controls the sending of data chat.js...
asked by 16.01.2017 / 14:17
1
answer

Obtain percentage of CPU usage in javascript

I'm doing an application in node to get the percentage of use of the processor, I tried to get it from the module times os, but it differs a lot from what it shows in the task manager. I have tried with this: link EDIT: In the end I deci...
asked by 27.10.2016 / 19:46
1
answer

Convert a pdf to tiff using tesseract

I need to convert a PDF file to tiff using the library Tesseract.js The application will be in HTML and JavaScript, what I intend is to choose the PDF and at the same time convert it to tiff, what I have for now is the following. <!DOC...
asked by 15.12.2017 / 00:08
1
answer

Error in nodejs [closed]

I am trying to do the following. I have the endpoint sgts. / /secret /user/login //Post-Get /user/logout //Post /user/register //Post-Get /user/recuperar //Post-Get I have 2 unlogged and logged middlewares Here are my routes: router.u...
asked by 25.09.2016 / 18:36
0
answers

Authenticate my APP NodeJS on GitHub

I have an app that recovers licenses according to the repos of my organization. But I'm currently having problems getting them, since it returns 404 error and no license. From what I saw it is a matter of having to authenticate the app on github...
asked by 09.12.2016 / 20:57
2
answers

Going through a json, jade

I'm trying to run a json in jade but I have problems, because I get trash data. usuarios={ _id: 57e66c6b0d38b61f3c0e626b, name: 'asdas', lastName: 'dasdasd', userName: 'dasd', password: 'ada', __v: 0 },{ _id: 57e66e16228d2f0674a90af5, name: 'd...
asked by 10.10.2016 / 09:50