Questions tagged as 'node.js'

1
answer

HTTP (Post) Bad Request 400 - How to solve?

I am making a post, but my server is not sending an error (400). Below is the server code. const express = require('express'); const app = express(); const bodyParser = require('body-parser'); const mysql = require('mysql');...
asked by 28.09.2018 / 21:48
1
answer

Why use nodeJs with asynchronous functions with AWS-Lambda?

The AWS-Lambda services can be developed in Java, C #, Python, Go, PowerShell and finally NodeJS ( DOC ). Nowadays NodeJs are used as an application backend with the advantage of natively developing asynchronous server requests through assync...
asked by 19.09.2018 / 22:03
0
answers

When using async do not need to use callback?

I have the following function in nodeJs v10.6: #func-1 module.exports.funcOne = (event, context, callback) => { callback(null, { message: 'funcOne', event }); }; #func-2 module.exports.funcTwo = async (event, context) => { console...
asked by 03.08.2018 / 21:27
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

Send post parameter to restify

I'm trying to send parameter to nodejs with restify, but it's always getting undefined I'm sending more or less like this: $.ajax({ url : 'http://localhost:8080/api', type: 'post', dataType: 'json', data:...
asked by 20.07.2018 / 20:52
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

Localhost Can not read property 'route' of undefined

I have an application that runs perfectly on herokuApp. But when in local application the build works but the dist folder has errors. The console.log displays the following 3 errors below. If someone has gone through this and I have an answer, I...
asked by 24.07.2018 / 13:21