Questions tagged as 'express'

0
answers

NodeJS Error: "ERR_HTTP_HEADERS_SENT]: Can not set headers after they are sent to the client"

Well, I have a problem with my application, however I still can not understand the reason for this error, since this only happens if a user updates their password and then tries to log in. // Function validating login router.post('/processL...
asked by 21.12.2018 / 22:48
1
answer

nodejs and express with conection timeout (h13) in heroku when dealing with pagseguro notifications

Hello, I have an api in heroku and she communicates with the pagseguro api (notifications), the wheel that handles the notification needs to pick up the transaction code that is received by post, make an appointment in the pagemobile api get the...
asked by 26.12.2018 / 13:22
0
answers

Variable in EJS

Good morning everyone! So, come on: I'm trying to use Plotly to generate a bar chart, and it accepts variables. I have a connection in NODE.JS with a database, and NODE.JS in thesis (After a console.log in the route) is passing to the view wh...
asked by 11.09.2018 / 14:24
0
answers

JWT and Passport returns 401 React

Good afternoon. I am learning JWT and Passport and am experiencing problems with the same, the problem is this, I can login and save in LocalStorage, and redirect to another page however, even entering the correct data I get a 401 (Unautho...
asked by 29.08.2018 / 20:43
1
answer

Keep req.body parameters when changing routes

Hello, my question is the following: I'm using Express / bodyParser and Nunjucks. I submitted a form with method POST from my Root route '/'. In form I have two data: Username Date of birth In the post that I submit the form...
asked by 26.07.2018 / 01:08
0
answers

ACL doubts with node.js!

I'm trying to implement Authorization (ACL) using the npm plugin "node_acl" in a Node.js application with express, I'm trying to implement as explained in the documentation .. however I'm having difficulty applying this in practice .. I have the...
asked by 18.08.2018 / 02:12
0
answers

Avoid route authentication late with JWT

JWT allows us through the unless method to inform URLs and request methods that should not require authentication. But as far as I know it is necessary to do this when the Middleware is informed to ExpressJS in the early stages of conf...
asked by 18.07.2018 / 06:10
0
answers

create login system with gamesparkapi

I created a file called connection api.js my problem is that I can not get my site when the login password is correct send me to a certain page and if it is wrong send me to another page follow the code var pass; var user; module.exports =...
asked by 05.08.2018 / 16:06
1
answer

problem sending values from one route to another

I am making a login system with mysql I am not being able to pass the route values to another I want to move from router login to router users follow the code connection.query('SELECT * FROM users WHERE username = ?', [username], function(...
asked by 05.08.2018 / 18:19
0
answers

OPTIONS is generated when a POST is performed

I have an API and am trying to connect to an online store but every time I try to perform a POST an OPTIONS is returned. I decided to use JWT to authenticate requests and avoid OPTIONS but to no avail. app.post('/auth', function(req,res){ v...
asked by 27.04.2018 / 17:28