Skip to main content
Filter by
Sorted by
Tagged with
1 vote
1 answer
26 views

Generally, when writing vue.js front-end projects, node.js is used. For example, npm installs some node.js three-party packages to node_modules/. Excuse me, node.js is generally the code running on ...
Lance O's user avatar
  • 11
0 votes
1 answer
254 views

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 ...
slass100's user avatar
1 vote
2 answers
2k views

This is the code: var http = require('http') var options = { hostname: 'localhost', method: 'POST', port: 8000, path: '/' } var s = 3; http.request(options, (res)=>{ }).end(s+...
Mark's user avatar
  • 69
4 votes
5 answers
2k views

this is the code var t = ()=>{ setInterval(()=>{ console.log('hello') },1000) } t(); clearInterval(t) Why the clearinterval does not block execution of the setInterval?
Mark's user avatar
  • 69
-1 votes
3 answers
154 views

This is my code, there are 2 files: file b.js module.exports.data = function() { return new Date(); } file a.js var a = require("./b") var http = require('http') http.createServer(function(req, ...
Mark's user avatar
  • 69
2 votes
2 answers
268 views

This is my code in node js: var http = require('http'); var options = { host : '127.0.0.1', port: 8124, path: '/', method: 'GET' }; http.request(options, function(res){ ...
Mark's user avatar
  • 69
1 vote
1 answer
1k views

My Code Looks Like this var Client = require('ssh2').Client; var fs=require('fs'); var conn = new Client(); conn.on('ready', function() { console.log('Client :: ready'); conn.shell('xtail', ...
1031210155 145046's user avatar
1 vote
1 answer
2k views

I tried to install Node.js on the Windows 10 64 bit using installer. When I run installe.exe I accept rules and push next button, in any case I get the following notification: When I tried to set ...
Babaev's user avatar
  • 105
2 votes
1 answer
2k views

I wanted to send a message to my user channel of my Phoenix Application. I have joined a user_token with the channel as users:user_token in the user_channel.ex . I was successful doing it from another ...
CfourPiO's user avatar
  • 351
0 votes
1 answer
147 views

Here is my object: obj = { "FirstName": "Fawad", "LastName": "Surosh", "Education": {"University": "ABC", "Year": "2012"} } Here is my node.js code: var nodeName = '...
M. Fawad Surosh's user avatar
0 votes
2 answers
451 views

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; ...
M. Fawad Surosh's user avatar
0 votes
0 answers
66 views

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....
M. Fawad Surosh's user avatar
2 votes
1 answer
7k views

Respected, I use Node.js to create TCP client using 'net' module to connect with Hardware device(Which only supports TCP Protocol) which Streams data when available,so that I could listen on('data',...
androidlover's user avatar
0 votes
3 answers
2k views

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 <Buffer 00 01 00 00 00 00 00 02> now ...
Ajay Mehra's user avatar
1 vote
0 answers
143 views

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'...
shaunc's user avatar
  • 5,661
1 vote
1 answer
431 views

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); ...
RoyHB's user avatar
  • 1,745
19 votes
3 answers
9k views

We can access local module using require function but cannot access global module through it. I read somewhere that to use global module we need to make it local then import it through require ...
Badal's user avatar
  • 376
1 vote
2 answers
4k views

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 ...
John Smith's user avatar
1 vote
0 answers
273 views

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 ...
Carol.Kar's user avatar
  • 5,271
0 votes
1 answer
47 views

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 ...
Androider_Girl's user avatar
1 vote
1 answer
255 views

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 ...
Rajesh Kamalanathan's user avatar
0 votes
0 answers
939 views

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('....
Anish Tangbe's user avatar
5 votes
2 answers
5k views

I've deployed my nodeJS server in windows azure. My client fails while connecting to server and handle the following error : WebSocket connection to 'wss://ooplrfrfranode.azurewebsites.net/socket.io/...
Moussi's user avatar
  • 470
-1 votes
2 answers
277 views

Problem in accessing flash messages on view in node.js In my Controller this.req.flash('info','successfully submited'); this.redirect("/home"); In my home view I am not able to get flash messages as ...
user3680001's user avatar
0 votes
0 answers
153 views

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 ...
Nuno Barros's user avatar
1 vote
1 answer
3k views

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 ...
Xfoguet's user avatar
  • 75
0 votes
1 answer
585 views

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 ...
user2990972's user avatar
0 votes
2 answers
1k views

A simple question, I use nodejs for HTTP restful API service. Now I want query some mysql data before http server start, the code snippet: var price = -1; var userId = 'some user provided value'; ...
linbo's user avatar
  • 2,431
5 votes
3 answers
8k views

I am attempting to pipe the stdout & stdin of a child_process to a browser & display it in an html page. I am using browserify to get node.js to run on the browser. My code for spawning the ...
ssarangi's user avatar
  • 612
2 votes
1 answer
728 views

I built a simple Node socket.io server, and two simple Node socket.io clients. Each client connects to the server, sends a single request, waits for the response, and prints it. The problem is, each ...
Erel Segal-Halevi's user avatar
0 votes
1 answer
1k views

I am new to node.js. I have a question regarding connecting my node.js with UI. I have a node.js server which produces rest API with basic authentication. I have written a node.js rest client which ...
Sau's user avatar
  • 2,127
11 votes
2 answers
46k views

I want to get use this rest api with authentication. I'm trying including header but not getting any response. it is throwing an output which it generally throw when there is no authentication. can ...
Sau's user avatar
  • 2,127
0 votes
0 answers
401 views

I've begun using Node.js to make web applications. It's really awesome. I've come across a few modules that I want to incorporate into my build. I can work with the modules in Terminal after a global ...
terra823's user avatar
46 votes
2 answers
156k views

this is form example in html: <!DOCTYPE html> <html> <head> <meta charset="utf-8" /> <title>CSS3 Contact Form</title> </head> <body> <div id="...
royb's user avatar
  • 723
32 votes
3 answers
40k views

When using node.js as a client, is it possible to connect to a server using Windows integrated authentication (e.g. when connecting to IIS)? My searches for this only turn up results where node.js is ...
laktak's user avatar
  • 60.6k