Questions tagged as 'node.js'

2
answers

How to run server with loopback?

I have access to a backend project and would like to know how to run this project. It uses loopback and reading documentation of loopback , in the statement 4 says:    Start the web server. What command should I use...
asked by 24.10.2017 / 10:55
1
answer

Error: "Can not set headers after they are sent" in Node.js / Express

I have the following method: //USER_POST router.post('/user', (req,res,next) =>{ var obj = {name:req.body.des_name, email:req.body.des_email, endereco:req.body.des_endereco, c...
asked by 17.10.2017 / 15:59
1
answer

problem reading external Json NODEJS

I have a problem reading an external Json but I can not identify it, I checked json and it appears correct. This would be Json link I checked and it's correct, and before it worked and suddenly stopped SyntaxError: Unexpected end of JS...
asked by 04.11.2017 / 13:36
1
answer

Express return post

Good afternoon, I have a problem with the POST return in express, I wanted to make a user registry using the following code: router.post('/user', (req,res,next) =>{ var obj = {name:req.body.des_name, email:req.body.des...
asked by 11.10.2017 / 20:02
1
answer

How do I delete old files from a specific extension?

I have an application that creates mp4 video files 24/7, to do cleaning these files I need to delete all unmodified files in the last 30 days for example. How to do this in Node Js? I already looked for references and did not find.     
asked by 05.10.2017 / 21:01
1
answer

Error 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 (module.js:417:25) at Module...
asked by 24.09.2017 / 15:38
1
answer

res.json NodeJS / Express

I have a cruel doubt on nodeJs / Express, I'm pretty new to the language but what I need is to pass the id on a route so that it executes and returns a query. I want to do in fragmented files, so I have a Routes file (with all routes) an API...
asked by 06.10.2017 / 22:27
1
answer

Create new node in Firebase

I'm developing an application for chat rooms on Android using Firebase. The current structure is as follows (being Siege, Beauty etc rooms): Sofar,userdataisbeingstoredwithFirebasedefault,com.google.firebase.auth.FirebaseUser;,butnowIneedtos...
asked by 13.09.2017 / 16:44
1
answer

Express Validator Custom - NodeJS

I'm using express-validator in my api to validate the received data, I'm creating a custom validation to check if the user's email is already registered in the system, but I can not fire a throw new Error('Email em uso'); validator...
asked by 08.09.2017 / 22:40
1
answer

Redirect after receiving response from the server?

I have an application that the front end is VueJS / Quasar and the server is hapiJS. I'm working on the login part and would like to know how to redirect the page after receiving confirmation from the server that the login information is correct...
asked by 25.08.2017 / 16:56