Questions tagged as 'node.js'

1
answer

Why use two server-side languages on the same system?

Why do I see many systems with two, up to three programming languages? When I see a system that migrates from one language to another, I even understand, but why do many maintain two or three programming languages? For example, I've seen...
asked by 07.01.2017 / 14:41
1
answer

How to create a module in npm?

The idea is to be able to download this module by npm install and be able to execute this package: npm install nome-do-modulo --save Once downloading could run on my project as follows: nomeDoModulo = require('nome-do-modulo')    ...
asked by 02.09.2016 / 18:32
1
answer

Integrating HTML + Node.js with Angular.js in "Real Time"

I have some issues with automatically updating a code in Angular.js inside my site. The integration is Node.js with HTML, integrating with Angular.js. However I have to always give F5 on the page so it updates the variable "Temperature". I would...
asked by 03.10.2016 / 21:04
1
answer

How to print directly without opening the browser dialog?

I am developing a web system where I need to print a label and a non-tax receipt after submitting a certain form. To perform this action, I have two printers: Non-Fiscal Matrix Printer MP-20 MI - For non-tax coupon; Zebra Thermal Printer T...
asked by 19.09.2016 / 22:49
4
answers

Node replaces Nginx? Does anyone explain this architecture to me?

I was reading a article about the "dawn" of JavaScript companies. The "dawn" in the sense that things are only beginning. That is, according to the author, the future is JavaScript with NodeJS, and companies will sooner or later have to replac...
asked by 09.09.2016 / 04:07
1
answer

How to use passport.js on node to log in against the database

How to use passport.js to control access using the database and express.js middleware. How to make login logic and how to know that the session is already authorized when the user has already logged in?     
asked by 12.09.2015 / 22:56
1
answer

How to see all modules installed on nodejs?

I'm giving a spin on nodejs and would like to know how to list all the modules I've installed. How can I do this?     
asked by 05.12.2015 / 18:06
2
answers

How to save JSON file with Node.js

I want to make a website to test some things. The site is running on my home server made with Wamp. I was told I could make a small database using JSON files. I have a JSON file in the site folder that contains the following: [ {...
asked by 31.01.2014 / 01:57
1
answer

nodejs, get value from a mysql SELECT

Well, I wanted to know, how can I get this result, and turn it into variable and be able to use functions inside the script, example take that Name warrior and use it as a variable, type: con.query( 'SELECT * FROM servers WHERE id = ?'...
asked by 05.06.2017 / 11:17
3
answers

Search MongoDB Array

I have these two documents in the mongo: /* 0 */ { "_id" : ObjectId("54f395ef7a5a5ea37af77398"), "HISTORICO" : [], "MOTIVO" : "", "RP_CANCELAMENTO" : "", "DATA_CANCELAMENTO" : null, "RP_FINALIZACAO" : "", "DATA_FINALIZACAO" : null, "STATUS_CH...
asked by 02.03.2015 / 00:53