Questions tagged as 'node.js'

1
answer

Empty input after submitting form

Hello, I'm developing a login system, but I'd like to improve something. When I register a user, and type their name, address, etc., and make the request of the form, it returns all the empty inputs. Like the GIF below ... Notice in the ab...
asked by 10.10.2018 / 00:11
1
answer

events.js: 72 error - Error running my first global app with express

I did the global express installation on Ubuntu (and my Mac too) using npm install -g express Then I created my app using the command: express -se hello_express I went into the application directory and typed: npm install When I...
asked by 18.02.2014 / 15:34
1
answer

How to ensure insertion and update of data in different databases

I'm developing an application with a microservices architecture and a question arose me. Each functionality of the application will have an isolated API, how can I ensure that when doing an insert / update in the functionality database x, also d...
asked by 17.03.2018 / 20:40
1
answer

Pass variables on all renders

I have an application using NodeJS, Express (and a few more dependencies). I reduced the application to the file below to explain my question: app.js: // Dependências. const express = require('express'); // Criar a instância do express. le...
asked by 18.01.2018 / 17:16
1
answer

Use require () (or another method) in NodeJS as in PHP

In PHP Suppose I have a const file in a root directory called const.php : define('CONST_1', BASE_CONST_1 || 'Value 1'); define('CONST_2', 'Value 2'); define('CONST_3', 'Value 3'); And another file, in the same directory, named index.ph...
asked by 10.01.2018 / 21:18
2
answers

HTML how to open url stored in a variable

I am not very knowledgeable in html, I want to open a link that is stored in a variable but without success. <div class="csgo-item--inspectLink"> <img src="static/img/inspect.png" href="{{item.inspect}}" target="_blank"style="wi...
asked by 07.11.2017 / 18:29
1
answer

WebPack + NodeJS import bootstrap + jquery

Hello, everyone at Stackoverflow, I have a VueJS project already with Webpack. And I've been importing the JQuery and Bootstrap libraries. I went to my node and used the commands npm install jquery --save-dev npm install bootstrap --save-de...
asked by 20.09.2017 / 15:56
1
answer

JavaScript object does not create new keys

I'm using MongoDB and it returns me all the right data but when I want to add a new key it just does not create. exports.validaLogin = function(req, res) { login.find({ "nome": req.query.usuario },function (err, logins) { if(err) { re...
asked by 01.11.2017 / 20:13
2
answers

Base64 verification?

I'm doing an email application (HapiJS) and found that some emails have text that is encoded for base64, but others do not. In this application I will need to receive emails from all the services (Gmail, Hotmail, ...) and I need to make a met...
asked by 29.08.2017 / 15:51
1
answer

Search and Replace mongodb database

I have several collections in mongodb and I would like to do a "search / replace" for all collections and for each field that is string "http:" replace with "https:" Example: var object = { "_id" : ObjectId("58e7c7a5b03d4641f2aad7bb"),...
asked by 11.04.2017 / 19:05