Node.js is an event-based, asynchronous I/O framework that uses Google's V8 JavaScript engine. Node.js is commonly used for heavy client-server JavaScript applications.
1
vote
0answers
21 views
my images will not loaded properly in my images folder
i am writing an web crawler that will extract title description and images from url ..i want to save images in images folder in my project that is save correctly but images does not loaded completely ...
0
votes
0answers
4 views
node websocket stream (sockjs & shoe) succeeded only once
I try to implement a simple websocket stream with
shoe (wrapper for node stream on sockjs ).
Basically, a TCP connection occurs on demand, and pipe the TCP socket stream to console or webBrowser ...
0
votes
1answer
8 views
redis.lpush a number of items
In my node.js script I have an array of strings, and I want to LPUSH these strings into a Redis queue. I tried:
var redis = require('redis').createClient();
redis.lpush('queue', ['1', '2', '3'])
...
0
votes
2answers
10 views
How do I convert this MongoDB Date value?
This has me stumped. I am fairly new to noSql, and node.js development. So running into moments of what the heck are pretty common. Yet I cannot come to grips with this one on my own.
We are ...
0
votes
0answers
9 views
how to set node.js net socket object fd
i want to set socket fd net modual, node.js
and useing ajax post method(http://localhost:3000/connect)
my code is here
exports.connect = function(req, res){
var Socket = require('net').Socket;
var ...
0
votes
0answers
14 views
Can I setup my node.js server and without routes?
I'm starting with node.js and socket.io, and the question could sound really noob, but I'd like to know if I could setup a node.js server and I can use an HTML in another directory listening the same ...
0
votes
0answers
7 views
Node-sass is not auto-compiling in latest node/express
Using node (0.10.15) and express (3.3.4), along with the latest node-sass, and I can't get my scss files to compile. My app.js file looks like this:
var express = require('express')
, routes = ...
0
votes
1answer
7 views
Mongoose/MongoDB removing items in model's array without stating which item
I am encountering behavior with Mongoose/MongoDB I do not understand. Mongoose is removing users from an array even when there isn't a user specified.
Here's the schema:
var DocSchema = new Schema({
...
0
votes
0answers
15 views
same cookie for domain and subdomain or redirect
I have example.com and www.example.com
I store a cookie with path as '/' as of now. Due to which, user is asked to login again if she visits the different domain than last time.
my question is "How ...
0
votes
0answers
10 views
Node.js client and server game using Telnet
I'm trying to create a basic game (only text) using Node.js, and it's 'net' library.
I'm hitting a bit of a wall. I can't seem to figure out how to prompt the user to enter some information, and wait ...
1
vote
1answer
10 views
How do I find what parts of an npm package work in the browser, and which don't?
As I understand it, almost all NPM packages (i.e. listed on npmjs.org) work like a charm inside a browser, using a loader such as Require.js. But obviously some features of NPM packages (for example, ...
0
votes
0answers
13 views
Socket IO Rooms: Get list of clients in specific room
I'm trying to display a list of clients in a specific room. I just want to show their username, and not their socket id.
This where I'm at:
socket.set('nickname', "Earl");
...
0
votes
0answers
20 views
Loop through array ; find and display modulus
I'm retrieving records from a .json file, that I'm generating with node.js (with fs, ejs, http, request, connect modules) ;
That's the code I'm using to retrieve the records:
<% ...
0
votes
0answers
6 views
Simple node.js unit test using mocha, and chai assert
I'm attempting to write the simplest of simple chai unit test with the assert style.
I have installed both mocha and chai libraries and created two files. The first is in the root directory of my ...
0
votes
0answers
12 views
Failed to find package.json - bad node folder structure?
I am trying to deploy my node webserver to Amazon Elastic Beanstalk. I'm uploading through their website and everything looks good until it tries to deploy, then I am getting this error:
Failed to ...