Questions tagged as 'node.js'

1
answer

how can I reduce this line of code in javascript? [closed]

I have a file like this: <html> <script> var a = document.createElement('script'); a.src = 'js/index.js'; document.getElementsByTagName('html')[0].appendChild(a); </script> </html> I have a folder called js, in...
asked by 12.05.2017 / 05:27
1
answer

NodeJS debug using visual studio code

I'm using Visual Studio Code and I'm not able to debug a nodejs through it. If I put a breakpoint anywhere in my app.js and start the debug, it works, but when I already have it in the browser and move to another route, for example, nothing...
asked by 13.09.2016 / 02:21
1
answer

Node.js receiving GET command [closed]

Hello, because of some problems loading the Twitter bootstrap libraries into my project, I made several changes to it, with the help of other users, I got to the following Node.js code: Node.js var http = require("http").createServer(servi...
asked by 11.09.2016 / 16:54
0
answers

Streaming of files by HTTP on Node

Hello, I'm developing a system in which one of the fundamental parts is to transmit a file via JS Node. Suppose I have a A connection , this connection is uploading a file via HTTP. And there is also a B connection , this connection wants to d...
asked by 21.01.2017 / 20:11
2
answers

NodeJS password authentication

I'm starting now with NodeJs and I'm following a password authentication tutorial. However, I can not call the method that compares the passwords. In my model, I have this structure: var UsuarioSchema = new Schema({ login: { type: String,...
asked by 08.07.2016 / 15:58
0
answers

Return pdf file from webservice with Node.js

Problem Context: There is an external webservice, which is not part of the domain of my application, which, when accessed directly via browser, takes the user to a loading web page that handles the request according to the parameters passed in...
asked by 25.05.2016 / 16:18
1
answer

TypeScript - Error: Debug Failure. False expression:

I'm trying to create a Node.js module definition. I have the file poolredis.ts , but when I add the line: import { RedisClient } from 'redis'; The TypeScript compiler gives me the error:    Error: Debug Failure. False expression:...
asked by 04.01.2017 / 19:40
1
answer

Passing query in DB by node to Array in Javascript Front-end

Hello, I am currently studying a bit of web programming (I am very exciting) and I ended up falling into node.js, I am finding everything incredible I am just having a certain problem, I want to access mysql return a query by node and pass this J...
asked by 07.07.2016 / 04:33
1
answer

Appcelerator error: Unable to locate cli executable

I'm using OSX El Capitain and just downloaded Appcelerator Studio. After installing I tried to run, and when I try to log in I get this error message: Unable to locate CLI executable (print from the screen below). I have already installed the No...
asked by 14.01.2016 / 20:14
1
answer

With generating the client_secret for an oAuth2 API

I'm using NodeJS, but I believe the question can be useful in other languages as well. The oAuth 2 specification does not determine the length of the string to be generated, it only informs this VSCHAR = %x20-7E It is the sequence of AS...
asked by 29.12.2015 / 13:21