Questions tagged as 'node.js'

1
answer

Pass variable to html page with NodeJS

I made a listing of files that exist in a particular folder, I would like that after listing, it would be possible to access this variable in HTML. Server.js var http = require('http'); var arquivo = require('fs'); var server = http.c...
asked by 18.04.2017 / 18:37
1
answer

Failed to run ionic server

Good afternoon, I'm trying to run the ionic serves right after creating the project without even tinkering with anything and always comes the same fault. I do not know what to try anymore. When I run the "ionic serve" command it brings me...
asked by 28.03.2017 / 20:25
1
answer

Node JS and MongoDB - Return data from a model to a route

I'm new with Node JS + MongoDB and I have a question about two days that I could not figure out how to solve it. My problem is this: I have a route file that makes a call to a model, as in the example below: Route file: 'use strict'...
asked by 03.04.2017 / 14:47
1
answer

TCP Server + Web Server in same application

Next person, I have some ideas about a project and I have some doubts ... 1st Is it possible to create a TCP Server that will handle the connection with the Client along with a Web Server using express that will have functions like start, sto...
asked by 06.05.2017 / 05:45
1
answer

spawn play ENOENT NodeJS

I'm trying to use a library called troubadour : const Troubadour = require('troubadour'); const troubadour = new Troubadour('sox'); app.get('/playmusics', function(req, res){ troubadour.on('start', () => { // Do something here...
asked by 13.01.2017 / 00:25
2
answers

how to direct a page synchronously in nodeJS

Good afternoon I have a page called index.js in the route folder of nodejs express. When the pendingAprovals page is called I would like the index to call a webservice to send a JSON to the pendingAprovals, but the node treats the asynchronou...
asked by 24.01.2017 / 14:59
1
answer

Problem with empty Array with mysql and nodejs

This is the action that is activated when loading the page: In it I get the following array as result. My problem is, when I have no records the ARRAY returns empty, I can not pass a parameter to the INPUT. Ex: input (value="# {data [0] [0]...
asked by 23.12.2016 / 14:42
1
answer

Create audio file, from URL

I need the messenger audio file, for use in the api Google Cloud Speech API. When an audio is received in the messenger, a url is generated that downloads this file in .mp4. How can I from this url retrieve the audio, and use it in the Google AP...
asked by 08.10.2016 / 01:04
1
answer

Warning when installing nodemon. How to solve?

I installed the nodemon with the following command $ sudo npm install -g nodemon I received the following error: npm WARN notsup Not compatible with your operating system or architecture: [email protected] How important is this error? W...
asked by 29.09.2016 / 21:55
1
answer

npm WARN deprecated

I have tried to find a solution on the net about this error and the ones I found did not work. npm WARN deprecated [email protected]: Please update to minimatch 3.0.2 or higher to avoid a RegExp DoS issue npm WARN deprecated [email protected]: P...
asked by 06.10.2016 / 19:42