Questions tagged as 'node.js'

0
answers

How to list records by ID using Node Express?

Look at the code below, it's working perfectly; function getRestaurant(req, res){ var restaurantId = req.params.id; Restaurant.findById(restaurantId).populate({path: 'user'}).exec((err, restaurant) => { if(err){...
asked by 03.07.2018 / 16:39
1
answer

Connection mongodb with nodejs

How do I connect to the mongo database with nodejs? I already consulted several sites but I can not do it correctly! Thanks for helping!     
asked by 29.06.2018 / 18:19
0
answers

How to send a file from an API to another API?

I would like to upload a file into an API (1), but instead of the file being stored in that API (1) I would like it to be stored in my API (2). Is it possible to do this?     
asked by 27.06.2018 / 17:33
0
answers

Server error in Node.js

Server running on port 8080 events.js:183 throw er; // Unhandled 'error' event ^ Error: read ECONNRESET at _errnoException (util.js:992:11) at TCP.onread (net.js:618:25) After some time in the air the server of this error...
asked by 27.06.2018 / 15:46
0
answers

PopUp Window on the Windows toolbar with React + Eletron

I am developing a basic castro solution and scheduling equipment maintenance. However I came across the following problem: According to pre-programmed periods the application should alert the user that the equipment's maintenance term is clos...
asked by 28.06.2018 / 00:17
1
answer

Format number with javascript

I have the following value: 7500 How do I get this value as final result: 75.00 , I would like to use pure javascript only. Other examples: 76000 > 760.00 1600 > 16.00 I tried to use toFixed but it did not work v...
asked by 05.07.2018 / 00:39
0
answers

I can not run the gulp command

I installed gulp globally and tb gulp-cli. however when I run the gulp command it displays the following error:     
asked by 27.06.2018 / 05:19
0
answers

Express.js - How to access the value of a variable within a route

I have the following function function fileList() { const uploadFolder = './public/uploads/'; fs.readdir(uploadFolder, (err, files) => { files.forEach(file => { let arquivoNome = file; console.log(arquivoNome); }...
asked by 07.07.2018 / 23:42
0
answers

Send a data to the bank with node js

I'm creating a REST API, but I'm having difficulty sending a data to the database using 3 modules, let me show my code rotaCliente.js on this route I get a json with email, name, password and cpf and command for the controller driver module....
asked by 24.06.2018 / 08:20
0
answers

Cross origin ionic problem

Personal'm kinda new with Ionic 3, and I'm experiencing this error http://localhost:3456/usuario/save. No 'Access-Control-Allow-Origin' header is present on the requested resource. Origin 'http://localhost:8100' is therefore not allowed access....
asked by 03.07.2018 / 20:33