Most voted "node.js" questions
Node.js (or commonly Node) is a Javascript Runtime created with Chrome’s Javascript V8 engine. It allows you to run Javascript code without the need for a browser, raising the privileges to those found in other desktop languages. It is a technology strongly focused on non-blocking programming of I/O operations, which makes it very efficient for these operations.
Learn more…2,679 questions
Sort by count of
-
1
votes0
answers139
viewsUse the same Schema inside a daughter key with Mongoose
I’m working with Nodejs, Mongodb and Mongoose where I’m creating a system of access permissions that work with infinite sublevels. Permissions have the same Schema: //app/models/PermissaoModel.js…
-
1
votes1
answer193
viewsSetting default values for variable with Pug Template Engine
I am starting to work with MEAN and use as template engine Pug. I know that the same was Jade before and that there were updates on how to work with the same. My problem is that, in Jade, and in…
-
1
votes1
answer520
viewsHow to run an Angular application with Node.JS and Express
How do I link an angled login application with the Node.JS and Express server. How do I test (pull) the application to the server. The server is running normally on port 3000: var express =…
-
1
votes2
answers345
viewsNodejs error and MSSQL module
Hello, I have an error in the nodejs MSSQL module for SQL Server connections. The connection occurs normal, the problem is time to perform the query, the function does not return me anything in…
-
1
votes1
answer67
viewsSession library for Nodejs/Hapijs?
I’m making an email application and I got to the part where I need to do the session and login part, but I’ve never done this before, I’m using Hapijs as a server and I’d like to know which are the…
-
1
votes1
answer170
viewsRelating Nodejs modules to Services Angularjs - Electron
Hello, Everybody! I’m starting a study in Electron and in this application I’m using Angularjs, the detail is that I don’t mean much about, and I can’t think of a way to use the Node without the…
-
1
votes1
answer73
viewsReferencing an import dynamically
Below I’m setting some Imports; import users from './user'; import securities from './security'; import softwares from './software'; and I want to be able to access them in the course of my file,…
-
1
votes1
answer185
viewsHow to use a Gulp file for production and development?
I was researching how to create a Gulp file that understands how to differentiate when it comes to production and when it comes to development. I found the plugin below, and would like to know if…
-
1
votes1
answer1659
viewsReturning callback values in main function - JS/Nodejs
I have a primary function and a callback function within it. I need that depending on the callback return my main function return something, note: function funcaoPrincipal(){…
-
1
votes0
answers111
viewsWeb Service for multiple databases
I’m starting with Node.js and wanted to know if someone could give me a strength in the matter of making a Web Service for multiple databases. I already have a code developed for Mysql, I need to…
-
1
votes2
answers170
viewsAvoid duplication in Mysql
Duplication of mysql ? I’ve been searching and nothing fits my case, every time I try to duplicate it. I’m trying to import it on the table: INSERT INTO profiles (id, rep, gems, plevel) VALUES (id,…
-
1
votes1
answer222
viewsnpm install 404 error
I started a course of Vue.js and I am installing a feature by Node.js but I am having problems with the npm command, take a look; What is wrong with my Ode on this command below? npm install vue…
-
1
votes1
answer75
viewsError Node .. version
C:\Users\Marcelo>node ..version module.js:471 throw err; ^ Error: Cannot find module 'C:\Users\Marcelo\..version' at Function.Module._resolveFilename (module.js:469:15) at Function.Module._load…
node.jsasked 7 years ago Marcelo Pinheiro 13 -
1
votes0
answers271
viewsCapture error return in asynchronous function for treatment
I am trying to treat a timeout error. When the timeout occurs the application should run again. Initially this loop should be done in an external module that calls this, however due to the…
node.jsasked 7 years, 6 months ago Victor Apolonio 11 -
1
votes1
answer1430
viewsFs.copyFile is not a Function
I’m trying to manipulate files with Nodejs, using the fs.copyFile on my server (Debian Jessie), but I can’t copy files. I’ve done everything to try to solve the problem, already copied exactly the…
node.jsasked 7 years ago Wesley Nascimento 395 -
1
votes0
answers66
viewsWhat is the difference between version 8 and version 6 of Nodejs
I recently started studying Nodejs in its V6.11.3 version and after a confusion between the official website documentations, I found that Nodejs has another version available, the 8.6. I was very…
node.jsasked 7 years ago Wesley Nascimento 395 -
1
votes1
answer319
viewsNode js problem when picking function value
I have the following structure in Node : module.exports.find = function(pesquisa,frase){ return new Promise((resolve,reject) => { pesquisa.find(frase, function(err,data){ if(err) throw err; else…
-
1
votes1
answer634
viewsCall Counter Socket.io
Well, here’s the thing I have the following code in my app.js of my project, which I picked up on the Internet to study: // Servidor: app.js // Iniciando servidor HTTP var app =…
-
1
votes0
answers36
viewsproblem with header Authorization/angular
Hello, I’m trying to access an external link to our application, which should be opened in a new tab. I need to pass the login and password in the call header, but I’m not getting it. I tried the…
-
1
votes1
answer191
viewsHow to delete old files from a specific extension?
I have an application that creates mp4 video files 24/7, to clean these files need to delete all unmodified files in the last 30 days for example. How to do this in Node Js? I’ve looked for…
-
1
votes0
answers63
viewsHow to send sms using javascript or angular or Node.js Free of charge
Good morning, I need a method or api that send sms for free, can be my number even tim(I have text plan)I searched and only found some easy-to-use pay... I’m getting ready for a university Ackathon…
-
1
votes1
answer435
viewsI am trying to install Ionic 2 but it is giving error in the time to run npm install -g Ionic codova
Gustavo@Gustavo-PC MINGW64 ~ $ npm install -g cordova ionic npm WARN deprecated [email protected]: Use uuid module instead npm WARN deprecated [email protected]: Please update to minimatch 3.0.2 or…
-
1
votes0
answers28
viewsJavascript Calculo Estranho
I am trying to run the following calculation in Javascript, 78.98 * 10 and the result returned is always 789.8000000000001 my question is where did this come from 0.0000000000001? I tried several…
-
1
votes0
answers109
viewsIonic 2 Error when generating build for android in windows 10
$ ionic build android > ionic-hello-world@ ionic:build C:\Users\Gustavo\Documents\Ionic2\like_you > ionic-app-scripts build [20:16:23] ionic-app-scripts 1.3.0 [20:16:23] build dev started ...…
-
1
votes0
answers369
viewsSave an image and generate Thumb with nodejs
I am trying to burn an image to disk and after that generate a Thumb of the images that was saved. To do this I saved normal the image in Base64 that was sent and in the callback of Fs.writeFile I…
-
1
votes0
answers2073
viewsError sending image to Discord
how could I send the image to Discord without having this error var Canvas = require('canvas') , Image = Canvas.Image var Discord = require('discord.js') , isla = new Discord.Client(); var server =…
-
1
votes2
answers544
viewsError starting nodejs+Sequelize+mysql project
When I try to start my project this giving the following error: D:\www\nodejs\master>node bin/www module.js:472 throw err; ^ Error: Cannot find module 'sequelize' at…
-
1
votes0
answers180
viewsNodejs Config Module Error
I have a mysql.js file that accesses the database as below: 'use strict'; var mysql = require('mysql'), config = require('config'); var connection = mysql.createConnection({ host:…
-
1
votes1
answer605
viewsHow to make notifications like Facebook? Angularjs or Javascript
I’d like to include notifications in my app. The app will be in Ionic, Angularjs, jQuery, Nodejs... is there a way for the app to run a function every X time? This function would get in Nodejs...…
-
1
votes0
answers769
viewsJson object in Ionic 2
I’m starting with Ionic 2 and Node.js and I’m trying to consume the API I created, but I’m having trouble locating the problem when I try to generate a ngFor listing from a JSON, so I’ve read ngFor…
-
1
votes1
answer32
viewsExport function using third party package
I have a code snippet that I use to consume a API and use this same chunk in several files. So I created a module to export such a configuration: 'use strict' // Module to access woocommerce API…
-
1
votes1
answer1208
viewsJson return error {"isFulfilled":false,"isRejected":false} + Node
I have the following code in the Node : var express = require('express'); var app = express(); app.get('/api/events', function(req, res, next) { var events = repositorio.ListAll(); res.json(events);…
-
1
votes0
answers33
viewsCommunication socket in Windows service
Next, I have a problem with an application I am developing, I need to carry out a communication between a Windows service and a web application, the Windows service will stay in the local…
-
1
votes1
answer202
viewsHow do I put an app to run in the background when it’s closed?
I am creating an application in Node.Js using Electron and I need it to continue running in the background when it is closed and turn into an app icon next to the computer clock for the user to have…
-
1
votes0
answers20
viewsHow to test Coffeescript Web Server application using Windows cmd?
I’m trying to test this angular made design. I have already accomplished the installation of Angular, Power, Grunt and Coffescript. I was able to reach the Web Server startup stage where the author…
-
1
votes1
answer82
viewsHow do you associate a calculus function within an express function to use in Routes?
To with a very big doubt, I have a function that makes calculations of users' metrics and I want to put it in an express function to be able to return a JSON and use it in a route, It follows the…
-
1
votes1
answer739
viewsHow to receive a post or get request with typescript?
i’m starting with nodejs now and would like to use typescript to program compiling for pure javascript. So I’m having trouble finding something succinct so I can understand (since I’m a PHP…
-
1
votes2
answers169
viewsUndefined variable, even if defined
I made a class, in which saved inside a login and user password array: function AccountManager() { this.accounts = {}; } AccountManager.prototype.createAccount = (login, password) => {…
-
1
votes2
answers101
viewsError Nodejs and when to use "=>"
Good afternoon, People I am starting my studies with Node.js technology, but when I tried to write the code of a web server example: const http = require('http'); const hostname = '127.0.0.1'; const…
-
1
votes1
answer806
viewsHow can I create my own protocol as well as HTTP?
See this code below. It creates a server with Node.js. But, if I change var http for example: var xyz = require ("xyz"), var server = xyz.createserver... makes a mistake. var http = require("http");…
-
1
votes1
answer563
viewsRescue HTML text from Mysql database with EJS (Node.js)
I am developing a news portal in Node.js where I save the posts in a Mysql database. As a template engine, I use the EJS. Use the Tinymce plugin to format the text of posts (use bold, Italic and…
-
1
votes2
answers102
viewsHow to assign the callback variable "cursor.toArray(err, doc)" to an external variable?
var result = []; var user = db.collection('user'); var cursor = user.find(); cursor.toArray(function (err, doc) { result = doc; }); console.log(result); // console ->…
-
1
votes0
answers56
viewsHow to organize an Express.js application
Given that express has no integrated "autoload" functionality, what would be the best structure or Boilerplate to follow in a large monolithic project? and how to raise it?
-
1
votes0
answers98
viewsKeystonejs with remote Mongo
Good night! I’m starting to study Keystonejs versão 0.3.17. Following the "Getting Started" of the official website, in the prerequisites nodejs and the mongodb, but I want to use that cloud service…
-
1
votes1
answer485
viewsAsynchronously checking existing files
My code gets writes a file, but needs to check if the file already exists and, if it exists, rename it. It is possible to do this without using the fs.existsSync? My current code:…
-
1
votes0
answers86
viewsError to open application
Good afternoon, I cloned a repository that uses Angularjs and Node.js. I would like to rotate it, but by clicking on "index.html" the site appears incomplete. In the terminal, inside the repository…
-
1
votes1
answer41
viewsError using file-type
I had asked a question here yesterday, and the blogger helped me by passing this code: const http = require('http'); const fileType = require('file-type'); const url =…
-
1
votes0
answers137
viewsPost storage for nodejs server with Ionic error Xmlhttprequest
I’m using the ionic 3 to effect a requisition http post to a local server developed in node js but the error is occurring: VM1515 ? ionicplatform=android:1 Xmlhttprequest cannot load…
-
1
votes1
answer539
viewsError socket.io Node.js
The intention with the program is that when two clients connect to display in a client window the id of the other. The program saves the two ids in the variables but sends only to the first user who…
-
1
votes0
answers190
viewsNotification with Firebase Cloud Functions for single device
I have a problem sending notifications using Firebase Cloud Functions, in case I would like the user to send notifications from the site, hosted by Firebase Hosting, to an android device. Since to…