Questions tagged [node.js-client]
35 questions
1
vote
0 answers
node readline, node http
I'm writing a command line interface which queries a REST server in nodejs.
I read commands from the user using node's readline.question. I send via http.request, (using cujojs, which however,
I don't think is directly implicated, as I've logged the…

shaunc
- 5,317
- 4
- 43
- 58
1
vote
1 answer
Mystery TCP error in node TLS client
I have several node tcp clients and a tls client that connect to external servers:
var socket = net.connect(args.connect.ip_port, args.connect.host);
socket.setTimeout(this.timeout);
socket.on('connect',…

RoyHB
- 1,715
- 1
- 22
- 38
1
vote
2 answers
how to folder synch between a node.js server and node.js application
A node.js client application needs to synch a folder with a remote node.js server. Both are running on windows.
The synch only needs to be one-way, from server to client and some way of knowing when it is completed would be good. Bandwidth is not a…

John Smith
- 15
- 1
- 4
1
vote
0 answers
Run node script from project path
I am running on win 7 and have installed nodeJS as a path variable.
I have installed a nodeJs module(pusher) in my laravel project and got the following folder structure a folder, when adding a further libary:
I would like to execture my server.js…

Carol.Kar
- 4,581
- 36
- 131
- 264
1
vote
1 answer
Derby.js Front end and Backend interaction
I'm new to NodeJs and i'm a core java developer. Can anyone explain me how DerbyJs interacts with Backend and how backend replies to frontend in turn?
I can see many functions. not sure which function i should use for which scene!!
I created a…

Rajesh Kamalanathan
- 11
- 2
1
vote
1 answer
WS websocket send() as a function
I'm having some issues with this. I'm connecting with socket.io (works) to another server, I want to send by WS to a client (processing). The main problem is that it just sends once, I want to send all the time that the socket.io gets an…

Xfoguet
- 75
- 3
- 9
0
votes
1 answer
how to throttle node.js http.get(...)
I'm trying to scan a network and limit the resources (bandwidth, sockets, etc.) being used. I thought I could use http.globalAgent.maxSockets with http.get().
My test code is:
// node.js v6.11.3
var http =…

slass100
- 66
- 4
0
votes
1 answer
Node.js: variable to act as nested element name for an object
Here is my object:
obj = {
"FirstName": "Fawad",
"LastName": "Surosh",
"Education": {"University": "ABC", "Year": "2012"}
}
Here is my node.js code:
var nodeName = 'Education.Year';
obj.nodeName; //this should return the…

M. Fawad Surosh
- 450
- 7
- 20
0
votes
2 answers
require('use-strict') doesn't work for me
here, I am attempting to set value for read-only property but I am not getting any error:
HERE IS MY CODE:
require('use-strict');
function Employee(firstname) {
var _firstname = firstname;
Object.defineProperty(this, 'firstName', {
…

M. Fawad Surosh
- 450
- 7
- 20
0
votes
0 answers
Using "jsonfile" API throws error
var http = require('http');
var jsonfile = require('jsonfile');
var util = require('util');
http.createServer(function (req, resp) {
if (req.method === "GET") {
var file = "./files/file1.json";
jsonfile.readFile(file, function…

M. Fawad Surosh
- 450
- 7
- 20
0
votes
3 answers
how do we encode each byte as two hexadecimal characters in ruby?
I have a hexadecimal number as
hexMidAppId = '0001000000000002'
In node.js, we have a library new Buffer(hexMidAppId, 'hex') which gives me the output as
now the same output i want to get it in ruby but i couldn't…

Ajay Mehra
- 1
- 2
0
votes
1 answer
Need help http Server and client server
I have used an application for login, adding friends and chat using node.js and mongoDB.I installed the node.js and monogoDB on ec2 instance. However, I do not know if need to use client server and http server?
Here is the application that I used …

Androider_Girl
- 9
- 6
0
votes
0 answers
How can I access file system from an external javascript file?
I have a file named server.js which reads an HTML file named "game.html".
That HTML file is linked with an external javascript file named "game.js".
In server.js file
if(request.url.indexOf('.html') != -1) {
fs.readFile("game" + request.url,…

Anish Tangbe
- 43
- 3
0
votes
0 answers
multiple http connections to test NAT
I'am in a project where i need to establish the most possible http connections and keep them open for nat port testing, using node.js but I'm not sure how I could do it, till now i got this:
var http = require('http');
var http_options = {
…

Nuno Barros
- 101
- 2
- 11
0
votes
1 answer
nodejs socket io cannot call emit of undefined. Causes?
I am using nodejs and socket io. The underlying purpose for the code is to ask for data from the server and to post it on the client website.
I have it made so that every 10 seconds, data is requested from the client to the server, and when the data…