Questions tagged as 'node.js'

2
answers

What are middleware in NodeJS?

What are middleware and what is its importance to the Node platform?     
asked by 18.05.2015 / 16:41
3
answers

CORS in NodeJS without the use of Frameworks

I'm creating an application in Phonegap and consuming an API provided through NodeJS. For this to happen, I need NodeJS to accept CORS. How do I enable CORS so that NodeJS accepts the request?     
asked by 15.02.2014 / 06:26
3
answers

How to organize a project in node

I would like some idea of how I could organize a project in node.js, currently the files look like this: - router.js - controller L controllerUser.js L controllerAuth.js L ... - service L mongodbConnection.js L serviceUser....
asked by 03.06.2018 / 04:22
5
answers

Transforming a JSON information into a variable

I'm calling a function in node.js and it returns a JSON: { "pair": "BTCBRL", "last": 2280.0, "high": 2306.0, "low": 2205.0, "vol": 113.17267938, "vol_brl": 255658.20705113, "buy": 2263.0, "sell": 2279.77 } I would like to us...
asked by 12.01.2017 / 14:51
1
answer

Desktop development with Electron

With the growth of web many people have abandoned desktop development, but some interesting technologies have come out, such as Electron :    Electron lets you create desktop applications with pure JavaScript through   of a runtime wi...
asked by 04.11.2015 / 16:27
1
answer

JavaScript: Differences between import and require

I know that import and require are used in JavaScript to import functions or third-party objects. It is common for code snippets like: import Library from 'some-library'; or const Library = require('some-library'); Howeve...
asked by 20.06.2017 / 04:37
1
answer

Why NodeJS has 4.x, 5.x, 6.x and 0.1x.x versions, etc.

Why Node.js exists in versions 4, 5, and 6, but also exists in 0.x.x versions. Or maybe, what are the differences between x.x and 0.x.x ?     
asked by 10.05.2016 / 03:07
2
answers

Check if git is installed using Node

I'm starting in a desktop application with the use of Electron however I need to check if there is Git installed in the system because it must necessarily use git As the idea is to distribute in Windows, Linux and Mac and the verificat...
asked by 08.08.2017 / 16:15
1
answer

Difference between promise.then (sucess, error) and promise.then () .catch ()?

Hello, I would like to clarify the difference and when to use each of the promising treatment templates: obj.promessa( parametro ).then( function ( resposta ) { console.log("Resposta: " + resposta); }, function ( erro ) { console.lo...
asked by 24.05.2017 / 21:59
3
answers

Pick up email response content

I'm using the imap library to sign in to a company account and bring in the new emails when it's an answer of an email I would just pick up the new content but I can not get this just the full conversation. Let me give you an example: A cli...
asked by 05.04.2018 / 21:22