Questions tagged as 'node.js'

1
answer

Mount structure with hexadecimal data

Do you speak all right? I get from a socket a buffer of 116 bytes in hexadecimal these bytes have a structure, for example: Starting from the beginning: 2 bytes = 1ª variável 1 byte = 2ª variável 1 byte = 3ª variável 2 bytes = 4ª variável...
asked by 03.05.2017 / 22:48
4
answers

NPM does not continue package installation

I'm trying to install a simple package with NPM, but the installation does not start, always to the same place. C:\Users\Gabriel>npm install -g luaparse --verbose npm info it worked if it ends with ok npm verb cli [ 'C:\Program Files\nodejs...
asked by 29.09.2016 / 21:37
1
answer

Receive parameter in delete request

I am trying to pass a parameter to my DELETE request, I tried to do the following: Use the same way I use in GET (where it works normal). app.delete('/contatos', function(req, res){ var obj = req.body; console.log(obj); }); Howev...
asked by 01.09.2015 / 04:51
2
answers

How do I set a token in the header?

Well I use jwt to generate a token only because the example I was following did not show exactly how to collocate the token in the application header. Would anyone know how? Note: I'm using express. app.js // part of the main file app.use(f...
asked by 23.09.2015 / 04:46
5
answers

Browserify + NodeJS [node: File or directory not found]

Situation I'm developing an extension for Google Chrome, and I need to use some NodeJs modules so I've found the Browserify tool so I can add modules to use it in the browser Environment I have the NodeJs, NPM and Browserify installed o...
asked by 28.04.2014 / 23:01
2
answers

Is it possible to restrict access to variable information with AngularJs?

Hello, I'm new to development and would like to know if there is any way to hide variable information in AngularJs, I'm using a MongoLab API and I did not want to leave my apiKey visible to anyone who debug the code in the browser, I'm runnin...
asked by 14.10.2015 / 05:44
3
answers

Error when trying to install modules in NodeJS: "Error: Can not find Python executable" python ", you can set the PYT HON env variable."

When I try to install the modules I need, it returns several errors at the time of installation (in this case I tried to install socket.io): MicrosoftWindows[versão6.3.9600](c)2013MicrosoftCorporation.Todososdireitosreservados.C:\Users\IvanS...
asked by 23.12.2015 / 11:32
2
answers

How to read a large line-by-line file with Javascript (nodejs)

I have a very large file to import data into MongoDB via Javascript. The problem is that I can not load the entire file into memory. I would like to read this file line by line, since each line is a record to insert into my bank. I know the f...
asked by 01.01.2015 / 01:16
1
answer

How to transform an asynchronous function into a synchronous one?

I have an asynchronous function and would like it to become synchronous, as being asynchronous it is sending the data to the client before even completing the necessary steps, it follows code: imap.once('ready', function () { openInbox(fun...
asked by 30.08.2017 / 14:35
1
answer

What is the difference between "dependencies" and "devDependencies"?

What's the difference between saving a component like dependencies or devDependencies in bower , npm , composer and others that use this structure?     
asked by 07.11.2016 / 00:51