Questions tagged as 'node.js'

2
answers

Increasing decimal count in nodejs

I'm developing a system, where I have to start counting at 1.00 and then go through there a number that will be chosen in the database. What I want to know is how can I make an increasing count in nodejs, which rises from hundredth to hundred...
asked by 05.07.2016 / 05:37
2
answers

What does the npm build command do?

I do not know much about Node, but I understand that npm is a package manager for node. As far as my view goes with npm I can download the project packages in a more practical way, I can host my project in a simpler way, not nee...
asked by 03.01.2019 / 18:30
1
answer

Working with Array.filter () in Javascript

Hello! I'm trying to generate a vector with only one "result". Basically I make a query in the mongo that returns me all the consultations done. I want to generate an array containing only the completed queries, which in the database are stor...
asked by 31.07.2018 / 17:20
1
answer

Installing the Atom Text Editor

I discovered a new code editor recently, Atom , which is on the platform GitHub . My question is about installing this editor and about the documentation that give . Do I have to install Node.js or simply unload Atom and install? Q: I do n...
asked by 31.05.2014 / 13:53
1
answer

The 'useMongoClient' error is no longer necessary in mongoose 5.x, please remove it

I tried connecting to the bank using these settings; 'use strict' var mongoose = require('mongoose'); mongoose.Promise = global.Promise; mongoose.connect('mongodb://127.0.0.1:27017/ep', { useMongoClient: true }) .then(() => {...
asked by 16.05.2018 / 13:56
1
answer

Existing file check asynchronously

My code receives write a file, however, it needs to check if the file already exists and, if it exists, rename it. Is it possible to do this without using fs.existsSync ? My current code: fs.readFile(file.path, function (err, data) {...
asked by 09.01.2018 / 02:45
1
answer

Check if the given URL is an image

I'm doing an application in Node.js, and I want to make a custom background system using the URL given by the user, I would like to know how to check if the URL given by the user is an image, and if it is not , the application gives return...
asked by 07.06.2017 / 23:02
1
answer

Node JS - MongoDB x MySQL

Why every Node JS tutorial we see, is always shown example in MongoDB. What do the two have that are so used? Why not use MySQL with Node?     
asked by 17.11.2016 / 22:29
2
answers

NodeJS Error and when using "="

Good afternoon, People I'm starting my studies with Node.js technology, however when I tried to write the code of a web server example: const http = require('http'); const hostname = '127.0.0.1'; const port = 3000; const server = http.crea...
asked by 24.05.2017 / 21:06
1
answer

Javascript possibly disrupting MySQL query [closed]

Recently I started working with SQL databases and I have had problems storing date type columns in my tables. Basically what happens when I try to store a variable in the format yyyy-mm-dd , for example 2016-12-23 , something happens...
asked by 23.12.2016 / 20:44