Questions tagged as 'nodejs'

2
answers

Inheritance in javascript with prototypes

I wanted to know what are the differences between prototype and __proto__ , in which cases each one is used, how inheritance works and what good practices would be by creating and using objects in javascript.     
asked by 10.10.2016 / 02:02
2
answers

Wait for an answer to continue a for Node.js

Good, I tell you my question: I have a function in node.js that what it does is to collect all the clients of a database SQL . I am using the mssql package for this but the issue is that for each client I must make another re...
asked by 30.11.2016 / 19:18
2
answers

Show / hide menus according to user profile / role

Good, my query basically is to guide me how to solve my problem in the most optimal way, I have a web with backend in nodejs where I send the static files (I do not use jade templates), I do all the modifications with javascript and ajax call...
asked by 01.10.2016 / 11:44
1
answer

know if there is a file so as not to write it

Should I use this function?    fs.exists (path, callback) I do not know how to do the function to know if the file with the same name already exists, and if not then create it my function is: function escribir(archivo,data){ fs.stat(...
asked by 05.10.2016 / 03:54
1
answer

Issue events from module Nodejs

Greetings, I am trying to issue an event in nodejs from a separate module, but I can not capture it, I have this code in the module var util = require("util"); var events = require("events"); function MyStream (connection) { if (!(this insta...
asked by 20.06.2016 / 01:21
3
answers

Scheduled tasks in Node.js

They asked me to design a script in nodejs which, when executed, performs tasks on a windows server. The problem is that I need to execute this task at a specific time of day so I thought about using the administrator windows tasks. After def...
asked by 08.06.2016 / 16:02
1
answer

How to always get the last tweet [duplicate]

I would like to know how I always get the last tweet from a specific account, not exactly from mine. I have already managed to do it but in a static way, I mean, using node and locally, I make a request and I get the amount of tweets that I...
asked by 03.04.2016 / 02:36
1
answer

Error: "Can not set headers after they are sent"

In a controller I am using promises because I perform multiple queries and I want to avoid having a multitude of callbacks, if you do not find a value must send a message to the client and not pass to the next promise. This is my code: va...
asked by 20.01.2016 / 18:04
1
answer

Twitter streaming API for NodeJs

I'm trying to get tweets from an account either mine or someone else's. Create an account on twitter, and create an application, I have the token and the keys, I would like to know if anyone has used this API, because I want to get the last t...
asked by 13.02.2016 / 18:01
1
answer

Embed [src]="src" does not work in Angular 7, unsafe url

I am trying to create a PDF viewer in Angular but when passing it the variable gives error. Can you give me a hand, please? HTML: <embed [src]="selectedFile" class="p-col-12" style="height: 800px;"> TS: private pathFiles = [...
asked by 07.12.2018 / 10:41