Questions tagged as 'nodejs'

1
answer

Run JS file when starting Ubuntu

first of all I notice that I'm starting with NodeJS ... I was trying the basics and what I found in some tutorials, until I wanted to try the DiscordJS library to create a bot, so later on my computer I do node discord_test.js And withou...
asked by 24.10.2018 / 04:21
2
answers

Firebase, Get random data ?, Create Filters Complexes [closed]

I'm programming an app similar to Pinterest and I'm currently using ionic and firebase, but I do not know if it's a good idea to continue using them, since firebase presents some limitations such as not being able to get a Random get from a list...
asked by 13.08.2018 / 06:24
1
answer

Know if a mail exists or not in Node.js

I'm doing an API that receives a JSON with various information of people, inside those an email, I need to validate if the email has the correct format, if the domain is correct and if the correct one actually exists in that domain. This is t...
asked by 07.09.2018 / 18:34
2
answers

Show complete an array

I have a program that I return an arrays with more than 100 number, the question is that in console (node) I get the following: [1, ,2 ,3 ,4 ,5 ,6 ,7 ... ,20 ,21 ,22 ... 88 more items ] How do I get my items to go side by side? Am I clea...
asked by 09.09.2018 / 22:47
1
answer

What is this error that I get when I use socket.io?

I have created a API that uses socket.io : const socketIo = require('socket.io'); const serverHttps = https.createServer(httpsOptions, app).listen(httpsPort, () => { console.log('HTTPS: Server running at ' + httpsPort)}); c...
asked by 21.03.2018 / 19:08
1
answer

Get data from an array of json objects

Hi, I'm trying to get the data from an array of json objects and save them in a different javascript array For examples I get this JSON through an api rest [ { "temperatura": 2.3, "fecha": "2018-02-05T06:13:01.000Z"...
asked by 07.02.2018 / 02:09
1
answer

TypeScript error TS1005: ',' expected Nothing happens to me!

I have the following problem, when compiling my code it sends me the following error:    ERROR in src / app   /components/login/login.component.ts(9,2): TS1005 error: ',' expected. I've seen several posts and I've done what they say but...
asked by 27.06.2018 / 07:53
1
answer

Shutdown and restart operating system with javascript

How could I send restart and also turn off the pc with javascript in the frontend or with NodeJS in the backend ?, I use Linux as SO . I was researching and I read something about hyperlinking a file .lnk that would per...
asked by 30.11.2017 / 15:23
1
answer

What's wrong with this function? Returns return undefined

I want to make a function that returns the data of this process but I am not achieving it since when executing it and sending it an id it returns undefined var getData = function(id) { db.collection('users').doc(id).get() .then(fun...
asked by 23.01.2018 / 20:48
2
answers

Double inquiry in a get

I must do 2 consult to fill a table in jade but I always take the second query as I do so that I can do the 2 consult and fill the table correctly. getAnalisisDetallado: function(req, res, next) { console.log('Entro aqui'); var...
asked by 27.06.2017 / 15:55