« first day (11 days earlier)      last day (66 days later) » 

00:29
0
Q: Importing PEGJS parser using require and module.exports

user1493950I'm trying to use a PEGJS parser in multiple different files. I use the method var Parser = require("./Parser"); When I try to parse something using Parser.parse, though, I am unable to do so, because Parser is undefined. How can I fix this? It had been working previously, but I made some chang...

0
Q: Website served by Express only serves pages with www prefix

Kate PriceI'm fairly new to this so please ask for more detail if I'm not providing enough. My issue is that my site is serving to www.mysite.com but not to mysite.com - however if I ping I get the opposite results... mysite.com responds and www.mysite.com can't be found. DNS-wise I think I'm good, but ob...

0
Q: Error Installing ExpressJS via npm

cphillI am running into an issue when I try to run "npm install -g express" and "npm install -g express-generator". Here is the error message for both. I have been able to install Express in the past by using package.json, but not through npm. Any ideas? : "npm install -g express": npm http GET https...

0
Q: Point not in interval

thomallenWhen I try to find all members within 50km of Salt Lake City, Utah from the Mongo shell I get the error: error: { "$err" : "point not in interval of [ -180, 180 ] :: caused by :: { 0: 0.0, 1: 50000.0 }", "code" : 16433 } Here is the query I am running: db.members.find( { 'geo.point...

0
Q: VS Express 2013 for Web - Closing new website creates new localhost folder and solution files?

JamesSGreetings from a new user of Visual Studio 2013 Express for Web that was freshly installed about two weeks ago. I would really appreciate any help or guidance regarding my issue below: For years, I've used MS Expression Web (and Expression Studio) versions 1-4 and am now migrating to VS 2013 Exp...

01:00
0
Q: Sailsjs SocketIO in iOS

fwheninI'm having a hard time wrapping my mind around a socket based chat app that I'm trying to do. I'm using sailsjs for my server side framework and trying to create a chat based app in iOS using SocketIO-Obj! I have a successful handshake with the sailsjs framework, and the onConnect method in the...

01:12
0
Q: Node.js Mocha Tests - SuperAgent - how can I send a text body instead of JSON?

BenI am using SuperAgent to test a Node/Express REST API. Using .send, the body content is automatically converted to JSON. I would like to send plain text only. Here is an example: request.post('localhost:3000/api/compile' ) .send('my example text that gets converted to JSON') .se...

 
1 hour later…
02:32
0
Q: mongo find operation returns an empty object

user3681865db.collection("mscCollection").find(function (err, cur) { console.log(JSON.stringify(cur)) }) When i run this it returns an empty object even though the collection contains documents and am able to find them using the shell

02:49
0
Q: Bitcore install errors

user3404160I am trying to install the Bitcore module for node on Windows 7 and am running into a few errors. Tried for quite a while to fix this but am not getting anywhere. Any pointers would be really great. npm http GET https://registry.npmjs.org/ruglify/-/ruglify-1.0.0.tgz npm http 200 https:...

0
Q: Why does this line cause Javascript to crash?

MB.This line in Chrome/NodeJS causes it to crash. How come? "www.asite.com/clothes-intimates-bras-bralettes/sub5-sub6-sub7-sub8".replace(/.*?([\w\s-]*)+\/?$/, 'www.asite.com/product/$1')

03:23
0
Q: Node-webkit works on Mac, crashes and can't load module on Windows

user756201I've created a full node-webkit app that works fine on the Mac OSX version of node-webkit. Everything works, it loads a key external nodeJS module (marked), and the world is good. However, when I try to run the app on the Windows version of Node-webkit as described in the Wiki, the app crashes i...

04:02
0
Q: peerjs connection opens, but no data is received

ZECTBynmoHere's my setup Server var webrtcServer = new PeerServer({ port: 9000, path: "/wrtc" }); Peer 1 (running inside a node-webkit application) var peer = new Peer( 'masterName', { host: 'localhost', port: 9000, path: '/wrtc' }); peer.on( 'connection', function(conn) { co...

-1
Q: Get header soap-server using node.js

ThrallI'm using node-soap to create a soap-webservice. When client send a soap message with header , I don't know how to get these header. Help me !

-2
Q: Can someone help me install Node.js

AdiI am a Beginner level web developer and I want to try PhoneGap but for installing PhoneGap we need to have Node.JS, which I have been trying to install for the last 2 days but no hope. Every single time I try to install it, the install wizard prompts an error saying that NodeJS setup wizard end...

04:34
0
Q: Post happening multiple times for ajax javascript, nodejs,expressjs

Sahebjot SinghIts a simple todo list, I wanted to try it in ajax from javascript. app.js var express=require('express'); var MongoClient=require('mongodb').MongoClient; var db; MongoClient.connect("mongodb://admin:[email protected]:10070/todo",function(err,database){ if(!err){ console.log(...

0
Q: tar-js add support for prefix

FrancisI'm trying to make tar-js work with file names longer than 100 chars in node. I've created the following override in my code: var header = require('tar-js/lib/header'); var format = header.format; // Intercept headers to set the filename prefix if necessary header.format = function(data) { ...

05:23
0
Q: Node js and eBay API implemenataion

user2828251Im a node JS beginner and i need help with exporting the console log data into HTML page. I found this great example at the GitHub: https://github.com/benbuckman/nodejs-ebay-api my problem is this: I managed to implement it with my needs - but I don't manage to extract the data out of the cons...

05:34
0
Q: NodeJS LDAP authentication using Passport and password encryption

user2727704I'm looking at PassportJS for authentication and have a login form with username and password. But if I look at the documentation, I see that the password is passed in clear text. Which means if anyone does a console.log(password), the password will be visible. How do I ensure the password submit...

0
Q: Node: Persist changes to an imported array?

user1891836In data.js, I have a big object array and a couple of functions: var arr = [ {prop1: value, prop2: value},...] function push (value) { arr.push(value); } function pop () { arr.pop() } module.exports.data = arr; module.exports.push = push; module.exports.pop = pop; To load the array &...

0
Q: MongoClient Native FindAndModify "Need update or remove" Error

syllogisticMy node.js client looks like this: var MongoClient = require('mongodb').MongoClient; MongoClient.connect(mongoendpoint, function(err, db) { if(err) throw err; var collection = db.collection('test-collection'); var ws = new WebSocket(websocket_Endpoint); ws.on('o...

0
Q: Conceptual confusion - Verifying client/server results in a Node app

R BrennanSuppose I have a server-side Node.JS game. What are some strategies to detect if the client tampered with JavaScript headed back to the server? Are there any best practices for verifying data sent from the browser to the server?

0
Q: Is there a way to test if there is a next in express middleware?

user3682278I'm developing a set of interchangeable middleware in expressjs and nodejs. I'd like to be able to check if there is more middleware before returning. function someMW(req,res,next){ if (next){ req.variable="hello world"; next() }else{ res.send("hello world") ...

06:04
-1
Q: Removing spaces, hyphen and brackets from a string

Tirthankar KunduI am getting a string like: var str = '+91 1234567891,(432)123234,123-123-13456,(432)(567)(1234)'; I want to remove the spaces, hyphen and brackets from every number. Something like: var str = '+911234567891,432123234,12312313456,4325671234'; Please suggest a way to achieve this.

06:34
0
Q: NPM not working with NodeJS installer

JohnI have installed NodeJS installer in windows 7 64 bit and entered NPM command in CLI. I am getting the following error. Any soultions...? **usage: npm < command > where < command > is one of....... ................... Specify configs in the ini-formatted file: ............** Please find th...

06:46
0
Q: Nginx X-Accel-Redirect not working with node.js

ti2mI'm trying to set up authorized file access on nginx backed by node.js. For some reason all the examples don't work for me. I'm trying to server files from /data/private/files My nginx configuration: ... server { listen 4000; server_name localhost; location / { proxy_pass h...

0
Q: instanbul cover report is wrong for test with mocha (using Mongoose)

jmcollin92I've tried Istanbul to get a cover test for my application. All seems to work fine, but some methods are marked as not covered and I'm sure (beacause of logs) that those functions are covered. Here is the code I want to test (it use Mongoose) : var mongoose = require('mongoose'), Schema = mo...

0
Q: node js easy rtc connection use https

styopdevi use easyrtc EasyRtc Github I use IFRAME streaming load my web page PHP. Everything was fine when my site was protocol HTTP. Now I changed the HTTP connection to HTTPS, connection beginning not to work. Node js installed on the same server, I connect to it via ip, without the https protocol. H...

07:42
0
Q: How to get textbox value in node.js file?

thevanThis is my html code: <form id="fileupload" method="POST" enctype="multipart/form-data"> <div class="row fileupload-buttonbar"> <textarea name="txtFolderName" rows="1"></textarea> <button type="create" class="btn btn-primary start"> <i class="glyphicon glyphicon-upload"></i

0
Q: Nested operations on list of redis in node.js

Aayui am using llen and inside llen i am using lindex in node_redis. Inside lindex the response is undefined. redisClient.llen("Device_Live", function (errorMessage, activeDevice) { for (var i= 0; i< activeDevice; i++) { redisClient.lindex("Device_Live", i, function (errorMessage, devic...

08:13
0
Q: Download video from ustream.tv with Node.js

JaroslavI'm want to download video from ustream.tv using Node.js. I have special soft on my Mac to do this. So it's possible. But I have no idea how to do it with Node.js. Please help!

08:58
0
Q: does Express uses cluster by default?

XeijpI try to use JMeter running benchmark on pure node.js and express server. And the result is : node.js = 600 RPS, express = 1200 RPS while running benchmark, node.js server always use 1 cpu, but express server uses all. Does this means that express server uses cluster by default ?

0
Q: Why fs.readFileSync encode single quote inside script tag to &quot;?

Riko NagatamaI want to get the content of an HTML file on my server using fs.readFileSync. But the string returned was encoded. Strangely fs.readFileSync only encode these 3 characters which resides inside script tag: & => &amp; ' => &quot; (single quote) " => &quot; (double quote) Below is my read file co...

09:25
0
Q: Node querystring parsing and character encoding.

Anders ÖstmanI have this code: var qs = require('querystring'); var http = require('http'); http.createServer(function (req, res) { if ('/' == req.url) { res.writeHead(200, { 'Content-Type': 'text/html'}); res.end([ '<form method="post" action="/url">', '<h1>My form

0
Q: Repeating output to the console

mlesThis is my code so far: saveuser = function(user, callback) { //... }; removeuser = function() { //... }; finduser = function() { //... }; updateuser = function() { //... } var options = { 1: { option: "Save a User", execute: saveuser.bind(nul...

0
Q: cordova platform add android error on windows 8

manuI am a new bee to phonegap and have just started going through this tutorial here. So please go easy with me :) I am trying to add android platform and getting this error: C:\Users\Manu>cd hello C:\Users\Manu\hello>cordova platform add android Creating android project... C:\Users\Manu\.cordov...

09:49
0
Q: wrap socket socks5 via tls fail

user3658060I'm writing a simple module that first will connect to socks5 then go to imap server (like imap.gmail.com:993). I successfully create a connect to Socks5 server and create tunnel to imap. But when I try to wrap it by tls.connect({socket: socks5SocketHandle}) I always get follow error message: ...

0
Q: Mongoose gridfs-stream how to populate fs.file collection

EgiwI'm using gridfs-stream module in nodejs for storing images. var db = require('config/db'); var Schema = require('mongoose').Schema; var schema = new Schema({ name: String, photo: Schema.Types.ObjectId // store file ObjectId }); var model = db.model('User', schema); model.findById('12...

0
Q: using local variable in callback function

Evgeniy PMy goal is to execute some javascript functions sequentially, where results from one functions often (but not always) used as arguments of another. var async = require('async'); var commonFunction1 = function(arg1, arg2, callback) { // callback(err, res1, res2) callback(null, arg1 + arg2, 11)...

0
Q: Error while installing zmq module in node

user3458261When I tried to install zmq package in node, getting the following error npm http GET http://registry.npmjs.org.org/zmq npm http 200 http://registry.npmjs.org.org/zmq npm ERR! registry error parsing json > [email protected] preinstall /home/sabarish/Desktop/node_modules/zmq > node-waf clean || (exit 0)...

0
Q: Include Dependent JS files in Node JS

skjindal93I figured out how to include a JS file in Node JS. But I have a JS file(hashing.js) which uses a function from other JS file(encoding.js). In encoding.js, I have exports = exports || {}; exports.encoding = encoding function In hashing.js, I have exports = exports || {}; exports.hashing = h...

0
Q: Returning results from a series of callback functions in Node.Js

deemeetreeI have an exports function in my Node.Js / Express app, which I want to return a certain value obtained through a series of callback functions inside of it. Trying to make it work for several hours but can't find the right way... Maybe you can help? Here's the code: exports.finalResult = functio...

0
Q: Facebook Chat in Node

user3635360So the situation is this: i'm able to authenticate and get/send messages with one fb account, with other two authentication is failing. It should work for all accounts, or not work at all and i'm not able to find the answer of this strange thing. What i'm missing? Steps: Using example app: htt...

0
Q: Setting up Webstorm Jade

Nazır DoganI m giving this error.but ide have jade plugin. An exception occurred while executing watcher 'Jade'. Watcher has been disabled Fixit.: Invalid executable

0
Q: Unable to use Kue's UI after login via Express

DannoEternoi've a little problem with Express js basic auth: in lame term, after that i login, it return me a TypeError: TypeError: Object # has no method 'path' This is the incriminated code: var http = require('http'), app = http.createServer(handler), io = require('socket....

-1
Q: Filtering nested JSON in rethinkdb

RamMy rethinkdb contains json objects with following structure. { "destination": { "name": "Koti Bus Stop" } , "first_down": "03:40" , "first_up": "03:40" , "frequency": "00:09" , "id": "541f5110-8a30-457b-ac90-bd27cb97540c" , "last_down": "00:15" , "la...

10:36
0
Q: $unset is not working in moongoose

KunduMy schema is as follows : - var Schema1 = new mongoose.Schema({ name: String, description: String, version: [{ id: String, status: Number }] }); I want to unset the version field. I try the following code :- Schema1.update({}, { $unset: { version: 1 } }, { multi: true })...

0
Q: npm ERR! weird error 126; occurs when try to 'npm start' node.js project?

XIMRXWhen I create node project and try to run it with npm start command from console terminal, npm ERR! weird error 126 occurs and project doesn't run. Further I see warning: This failure might be due to the use of legacy binary "node"

10:57
0
Q: mongo-log-rotator throwing error: { version: '2.4.9', file: null }

user3492125Tried to use mongo-log-rotator in nodejs but have no luck, receiving error { version: '2.4.9', file: null }. var Rotator = require('mongo-log-rotator'); // Every 30 seconds. var schedule = '10 * * * * *'; var rotator = new Rotator(schedule, { mongoURL: 'mongodb://loca...

0
Q: How to use knexjs globally in a sails js application

Arifhow do i get the knex object in my controllers or any other model files if i am not using waterline. for eg.: in my api/models/Users.js module.exports = { find : function(id){ // my knex query }, insert : function(data){ // my knex query again } } So ...

11:21
0
Q: Cant find /data/db folder (MongoDB)

BangalterI'm unable to find my ~/data/db folder that i created for MongoDB. I created it with "sudo mkdir - p /data/db" in my root folder. I am unsure of what the "sudo" command does as it seems the folder is hidden in some way. If i navigate to the root folder it does not contain a /data/db folder. Alth...

0
Q: coffee-script error: unexpected indentation in the end of function

Eduard3192993I am trying to make a REST API controller for getting user details in node.js using coffee. Here is my code: get_get: (req, res, params)-> @m_auth.can req.user, ['SUPER_USERS_GET'], (err, result)=> if err? || !result? || !result console.log err return res.send 401, { message: c...

0
Q: illegal token when using data from res.json using Node and Express 4

lewisI've created a simple bookmarks service for myself with a REST api built in Node using Express 4: res.json(200, output); // output is an object Using POSTman I've tested the api fully and all is working. I'm now trying to load the data with jQuery's $.post function: $.post( "http://my.uri.com...

0
Q: Unbale to fetch data in angular application using ipad mini

user3612296I am making an angular application for Dashboard. I am making several http requests from my controllers. When i build this project using grunt, it runs well on my machine and fetches the data from the express server which is also running on localhost on port 1222. But when i run the built code on...

0
Q: Node.js primus websocket clustering

user3683370Trying most of the websocket engines I've concluded using Primus (a universal wrapper for real-time frameworks) so to be able to test any websocket framework that may come around without changing my functionality. Even though that Primus does what it says, i've found myself in the situation were...

12:02
0
Q: Using Glimpse on a javascript website

Kevin UpI have a website that is written with Node.js/AngularJS that makes ajax calls to an ASP.Net mvc backend. Because I don't use the traditional 'Views' and 'aspx' pages, is there a way to use Glimpse in this scenario?

12:20
0
Q: debian wheezy / cassandra / nodejs

user3683535i try to use node-cassandra-cql to communicate with cassandra(1.1.12) but when i try a simple connexion : node connect.js connect.js source : var cql = require('node-cassandra-cql'); var client = new cql.Client({hosts: ['localhost'], keyspace: 'LIBRE'}); client.execute('SELECT * FROM Perso...

0
Q: node js error - Can't sent headers after they are sent

user2828251I'm using the ebay-api for node-js, and when i'm refreshing the page for some reason it send the data twice and therefore i get an error. in the console log i get the errors of "can't send headers after they are sent. Here is my code, can you figure out where am i double sending the requests ? ...

0
Q: Loading XML file into NodeJS as a JSON

user3307029I'm trying to load an XML file into my nodeJS project as a JSON and having some issued. The console.log(JSON.stringify(obj)) returns an undefined value. var returnJSONResults = function(baseName, queryName) { var XMLPath = "SomeFile.xml"; var rawJSON = loadXMLDoc(XMLPath); function...

0
Q: Node JS Express Ports

Asa CarterI am using redis to send a session cookie from PHP to Node/Express. The only way I seem to be able to access the cookie in my server.js code is if I create an empty file on the client and include it like this with the port: <script type="text/javascript" src="http://dev.nodetest.com:8080/empty.js">

1
Q: Node.js http server

raulI am trying to create an http server that reads only POST requests and returns the body of the request in upper case. This is my code: http=require("http"); fs=require("fs"); http.createServer(function(req,res){ if(req.method=="POST") { var body = ''; req.on('data', function (data) {body += ...

0
Q: How to evaluate an array of varying length in a boolean expressions in C?

AvaloniaMy question is very similar to the one already asked here. However the length (and input) of the array are read from a file. How can I evaluate the boolean expression in my example? fread(length, 4, 1, file); array= calloc(length, sizeof(*array)); fread(array, 4, length, file); b = 7; // I wa...

0
Q: Realtime Data Visualization - Thoughts for my Open Project

user3683642I am currently working on an open-source hardware & software for home automation, wireless sensors like temperature sensors, humidity sensors etc. The system is using low-cost 2.4 GHz (non-wifi, non-bluetooth) wireless modules (nodes) and a Raspberry Pi with a Wireless Module is collecting all t...

0
Q: HTML voice chat width Phonegap and node.js

abocwakIs it possible to make a live voice chat on a HTML app width Phonegap and node.js? Alex,

0
Q: Forms not working (using Bootstrap,Node.js and mongoose)

user3284596I have this simple form code which works perfectly with the node.js and mongoose, it saves data and everything but as soon as I add my other bootstraps features it doesn't save any data into database any more. Here are the two codes: The one which works perfectly: <div class="row"> <div cl...

0
Q: Aborted connections when using node.js/mysql connectionPool

DanFromGermanyvar mysql = require('mysql'); var mysqlPool = mysql.createPool({ host : 'localhost', user : 'nodejs', password: '', database: 'nodejs' }); // somewhere inside a method: mysqlPool.getConnection(function(err, connection) { // do some queries connection.release(); }); ...

-2
Q: How to use ReactPHP

user1768024Am I right that reactphp can be used alternation to nodejs for push notification like chat message, alerts etc? I am building real time chat where I am thinking to implement reactphp. I need some guidance to start. So my basic question is -> to start with reactphp on ubuntu do I have to instal...

13:24
0
Q: Node express and passport remember-me authentication

d9120I am looking into implementing remember-me authentication on my node app. I've managed to make all sessions have a cookie by adding a parameter to my cookie in my express session. app.use(express.session({ secret: constants.session_secret, store: new MemcachedStore({ hosts: [config.memca...

13:41
0
Q: How can I apply the decorator pattern with CoffeeScript to extend an object?

ShamoonI'm trying to create a node module that will interact with the github API, but will cache results in redis. You can follow my progress at https://github.com/shamoons/github-redis-etag (please, fork me!). As a base, I'm using the github package by mikedeboer. What I want to do is create a class t...

0
Q: Update mongo array field from angular

Kioko KiazaI have this jade file: <tbody> <tr ng-repeat="lineas in datuak"> <td class="tdlinea">Linea:{{ lineas.linea }}</td> <td data-ng-repeat="nireindex in [0,1,2,3,4,5,6]"> <table class="table text-center table-condensed"> <thead> <th>Mañana</th> <th>Tarde</th>...

13:58
0
Q: socket.io disconnected event not raised in case of pc switched off

Manish SapkalI am using socket.js to getting online users on my web application made in node.js, It is working fine. When socket connect, I am adding user as online, and when socket gets disconnected, set user as offline. It is working well if user closes tab/browser or doing logout from app, But when PC/comp...

-1
Q: Sqlite error then table is clear

user3093010How fix this problem, if table don't have any data in table, i get error and nodejs server stop running. How can i ignore error, then table is clear. /home/pi/app/project/app.js:377 if (!row) return done(null, false); ^ ReferenceError: done is not defined I am us...

0
Q: Using different router for different subdomains in node.js with express

marschroI want to use different routes in my app, depending on the subdomain in req.headers.host. So I came around with this idea (extremely simplified example): var express = require('express'); var domain1 = require('./routes/domain1'); var domain2 = require('./routes/domain2'); var app ...

0
Q: How does the XMPP server route a message to a particular user?

user3673959Read a few similar questions about pushing data to a client.But none of the answers were satisfying. Taking Facebook as an example where thousands of people talk to each other using instant messaging.I know there are lot of details involved behind it.I have read this [http://www.erlang-factory.c...

14:32
1
Q: Variable in parent scope not getting altered in anonymous function

yoaquimI'm using the opentok SDK for video chatting, and I need to create sessions. It's pretty straightforward, and that part's working fine. This is all being done in node.js, server side. The issues is - and it's mostly cause I still don't quite get var scopes (especially with anonymous functions an...

0
Q: Server-side Faye subscription in a cluster environment

RobertoI have a cluster of nodejs-based Faye servers. The server itself needs to subscribe to a channel in order to perform a certain set of operations: to do so, I use the server's client as such: var bayeux_server = new faye.NodeAdapter({ mount: '/pubsub', timeout: 25, engine: engine }); /...

14:44
0
Q: Node callbacks; else blocks vs return

IshpeckI often see node.js programmers, when calling functions that expect callbacks, do this: callSomeThing(arg1, arg2, function (err, data) { if(err) { // Handle the error case } else { // Proceed normally } }); Is there any particular reason why they use an else block inste...

0
Q: Including files with HTML in Node.js

rink.attendant.6I can't seem to figure out how to include a file using Node.js. All of the other questions seem to discuss including other JS files, but I'm looking for the equivalent of a PHP include (files that can contain HTML content). Usually in PHP, my view files like this: ...stuff <?php include 'heade...

0
Q: Bookshelf bug or I am doing wrong

FlakerimI have this on code: Object.prototype.getKeyByValue = function( value ) { for( var key in this ) { if( this.hasOwnProperty( key ) ) { if( this[ key ] === value ) return key; } } } and new User({ id: 1 }).fetch().then(function(collection) {...

0
Q: Xor operator in node.js with big numbers

webSpidertrying to get a xor of two big numbers, the result is not correct. example: > 7894237947293^4353453453 105105424 while on python, for example, it gets the correct answer: >>> 7894237947293^4353453453 7898549962768 How can I made a xor on node.js?

15:08
0
Q: Running Google Closure compiler with grunt

EternallyCuriousI am trying to create a grunt task to build a javascript project using requirejs with closure compiler as the optimizer. I am using the grunt-contrib-requirejs plugin. https://www.npmjs.org/package/grunt-contrib-requirejs Although I haven't explicitly setup the closure compiler, here is the con...

0
Q: PKCS5 Padding with node.js crypto

Greg RThe docs for node.js crypto indicate that padding is inserted automatically into the input stream. I have a simple test program that needs to compute the SHA1 hash of a cleartext, then encrypt that 20-byte hash use AES-256/CBC with PKCS5 padding. Here is my test code: var fs = require('fs'); v...

15:38
0
Q: MongoDB NodeJS Native cursor closing prematurely

Juan Manuel DiegoI'm executing a process to each element of a ursor, my collection has around 6 million documents, the entire process would take up to 10 hours since I have to process a profile at a time and it's a somewhat complex process for each one. var cursor = dbMain.collection("profiles").find({}); var...

15:53
0
Q: TypeError: Object has no method

BGbhaveshThis object thing do not work any method i apply .... suggest me some thing tried many things like load $('.talk-pip__container').children('object').load(function() { }

0
Q: nodejs - use string patterns to match filenames

user3175226I have some files to include: user_parse_info.js user_parse_age.js site_render_info.js site_parse_name.js Now I want to use patterns to determine which files will be included. Example: $ node app.js --files=user*,site_render_info So, what I need is convert the string patterns and check fil...

16:11
0
Q: LAMP With NodeJS and Socket IO

MishaI developed web site with LAMP, where I need users to chat with each other, make group chat or PM. I googled the solution and found that the best way to create chat/messaging application is NodeJS & SocketIO. I wrote small chat client/server application with Node and Socket. But I have a problem,...

16:23
0
Q: Time complexity/efficiency of Node.js emitter.removeListener(event, listener)

JonWhat is the time complexity of Node.js' EventEmitter.removeListener(event, listener) method in terms of number of listeners which are bound to a specific event on the emitter? Link: http://nodejs.org/api/events.html#events_emitter_removelistener_event_listener Is it O(n) or closer to O(1) for ...

16:41
0
Q: Save html as pdf in node-webkit

Joe KomputerI'm working on a node-webkit desktop app for windows and I'm trying to find the best way to allow the user to save an html table view as a pdf from the application. The application has to run out of the box, so I can't ask the user to install any third party programs to get functionality working....

17:01
0
Q: How to use Express JS 4.0's csurf?

JVerstryI have been checking csurf's wiki, but it is empty. This module adds a csrfToken() function to user requests, but then, how should I use it? Can someone give a code example with explanations? What should I do on user side? What should I do on server-side?

17:48
0
Q: Server-created events using Node JS

user2977468We are using node js, redis, php & mysql in our stack on Ubuntu 12.04. It's an internal application, and we're trying to get real-time notifications working correctly. There's a lot of code, let me know exactly which pieces you would like to see - I'll post them. Here's where I'm at: Whenever a...

0
Q: ctags not recognizing node.js harmony generators

user232343If I have function like this module.exports.login = function * () { or exports.login = function * (next) { ctags is not able to index it. Does anyone knows is there some workaround for this issue?

18:08
0
Q: Node.js with MongoDB driver - trying to get valid JSON output with quotes around keys

JimGI am very new to Node.js (and only slightly less new at MongoDB) - I am trying to figure out how to produce valid JSON using the native driver. The code below produces results, but the keys are not enclosed in quotes so my application is choking because it considers it invalid JSON. var MongoCl...

0
Q: Node.Js Twitter module and API - how does it query data?

deemeetreeI'm using the twit Node.Js module for dealing with Twitter API. Right now all the things that my app does are done from my own application registered on Twitter. However, what if I want to log in my users using their Twitter details and let them use Twitter through my app? How would this be done...

i love you
!!mute 3586251 24d
@SomeKittensUx2666 Muted user 3586251 for 24d
0
Q: How to get Grunt working..?

user3464303I have read a lot of different posts before asking here but I can't get through that error "Uglify not found".. I have downloaded node.js, uglfy.js.. Shortly I have followed all the steps here.. How to install grunt and how to built script with it So every time as I enter "grunt", it gives that...

0
Q: Set `process.env.commit` on Heroku push

Ryan BrodieI'm using NPM's scripts.postinstall to build our application using GulpJS when we push it to Heroku: "postinstall": "./node_modules/.bin/gulp build --require coffee-script/register" I want to be able to set an environment variable at this time with the value of the commit hash. This will then ...

0
Q: How to let grunt usemin update the JS to reference our revved images?

atom2uekiHow to let grunt usemin update the JS to reference our revved images ? from the yeoman web app generator, it only rewrite links for css and html, but no js. What if my JS file have some images need to be compressed, but cannot link :( Here is my current parts of grunt.js useminPrepare: { ...

0
Q: how do you use twitter bootstrap 3 with a node project

skinnybrit51At the moment I have a node project configured for client deployment. I am using watchify to accomplish this. The markup is based on twitters bootstrap. So I load twitters bootstrap in the index.html file using a cdn address. The issue with this is I have to load jquery beforehand as well. So...

18:34
1
Q: how to check if a string matches a pattern with asterisk

user3175226I have a list of files: var files = [ "user_parse_info", "user_parse_age", "site_render_info", "site_parse_name" ] Now I have string a pattern: var pattern = "site_*_name"; This should match only the last file. How can I check this? Maybe an RegExp?

0
Q: Performing simple authentication in Angular and Node

James HansI have been struggling with performing simple authentication in my angular node application. I am well aware that there are ready to use angular-express yeoman kits out there. But I want to understand this fuly and hence the attempt. What I have been able to do so far is create a login form whic...

18:52
0
Q: Chrome connects to websocket before pressing enter

GugisWhile making realtime chat with express.js and socket.io I noticed strange behaviour of Chrome browser. When i paste chat address (http://localhost:8000/) to address bar it connects to site instantly, without pressing enter. This does not happens in Firefox. Any suggestions? Thanks

0
Q: deletedRecord doesn't match the attribute defined in MODEL

tebesfinwoFor instance, I have following attributes defined in model. attributes: { firstName : { type : 'string', defaultsTo: null, size : 30, columnName : 'FIRST_NAME' }, lastName : { type : 'string', default...

0
Q: nodejs tools for automated authoring

slevinNodejs is a powerfull tool, but makes my life hard, because I have to create a server by hand, from scratch. I have no experience with writing code to manipulate server connections and implementing server security. I am experienced with setting a server (using an installer) and then creating a ...

19:16
0
Q: Express failing to look up view

user3674178I am trying to create a SPA app, but when i start my application it does an infinte loop leading to a crash. I am using ExpressJS 4.3.0 App architecture: public --partials ----index.jade server.js My express code: var app = express(); var port = process.env.PORT || 8080;...

0
Q: Node.js - Help Converting XML to Custom JSON

doremiI'm building a xml to json function which converts our XML structure to a specifically formatted JSON. I've tried many libraries, and ultimately, I've settled on just turning the XML into a DOM tree that I can walk and convert to JSON myself because the libraries don't provide the format I need...

0
Q: How can this extracted frontmatter (by gulp-front-matter) property be used as a variable?

SamGulp frontmatter can extract yaml front matter, and "adds a new frontMatter property to the file object" (quoted from documentation). However the documentation is rather sparse, and I'm having trouble figuring out how exactly I would use the extracted frontmatter. Say I want to store the extract...

19:46
0
Q: Serve flash policy requests on port 80 beside HTTP in node.js

laurundI want to serve socket connections from a Flash browser client, and therefore I need to add support for the policy-request-file protocol. I can't run the policy-file-request service on the default port 843 because of firewalls etc. The only option I have is to server the protocol on port 80, besi...

0
Q: How to pass a third argument to a callback using Bluebird.js nodeify

Paul D'AmbraWith a little help I've arrived at the following code to promisify a passport.js login strategy. var passport = require('passport'); var LocalStrategy = require('passport-local').Strategy; var Promise = require('bluebird'); var bcrypt = require('bcrypt'); var db = require('./db').db; //users are...

0
Q: Express 4 + Passport, req.user is undefined - function calling order?

Gang SuI encountered a very peculiar problem. I was trying to get express + passport to work. As vast majority of the examples online were for express 3, the process took me sometime - eventually I got the google authentication to work. I was trying to bind the google account to a local account, which r...

0
Q: Traffic shaping of nodejs socket.io not based on IP or Port

ArkaI have an architecture based on multiple stateless webservices loadbalanced with haproxy. Theses webservices host a cloud storage system that allow users to upload files at a predefined bandwidth depending on the plan the user suscribed. When the user is connected to his space a websocket is ope...

0
Q: Node Js Upload files to a remote server

btargacI have deployed an app on heroku, and i can upload images by submitting a form, but these images which were added to public/img/portfolio folder is deleted when my dyno sleeps after one hour or more. How can i upload image files to a remote server on NodeJS (the other server doesn't support nodej...

0
Q: Sailsjs: Unable to set session user.id to my model

Monty MonroI have a strange problem with sailsjs that is slowly driving me mad. I have logged into my app and can access the req.session.user object. However when I try to create a 'sale' which has a seller_id of the logged in user it errors out. As you can see below, in my controller action I am setting va...

0
Q: How to Add NPM Module (Decimal) to ArangoDB for doing ACID Transactions then

europeanguyI would like to do ACID Transactions with ArangoDB. And I would like to send the transaction Code (nodejs-code) to the ArangoDB server where it will then be executed and hopefully commited or rolled back if it fails. But at the ArangoDB serverside I need the NPM Decimal module or called package i...

20:40
0
Q: http request with node.js fail Can\'t set headers after they are sent

ThomasNDSI try to request a server with https/http and display the result in a web page. It's work as a script on a server but fail with i return the result with a get request. var express = require('express'); var app = express(); var port = 1337; var https = require('https'); app.get('/', function(req...

0
Q: List of Facebook Friend Usernames

user3238594I'm trying to get a list of all my friends (their usernames) on Facebook. I tried using this github project: https://github.com/lorensr/facebook-emails But, the new Graph Explorer API doesn't let you find every single Facebook friend so that method doesn't really work. Any other ideas? Thanks

0
Q: NodeJS/Express can't set headers after they are sent error when I upload files

techfreekI am working on a small web portal, and I've run into an error when I am uploading files(images) > ~25kb. I've tested the system, and it works great with small images, but then when I try a larger image, everything breaks. I am using the latest version of node, express 3.4.0, multer 0.0.7 and he...

0
Q: Nodejs forked child process throws "Unhandled 'error' event"

artworkad シThe error: events.js:72 throw er; // Unhandled 'error' event ^ Error: channel closed at process.target.send (child_process.js:402:26) at SerialPort.<anonymous> (/var/www/my_project/serial-worker.js:30:13) at SerialPort.EventEmitter.emit (events.js:95:17) at ...

0
Q: Ruby on Rails Javascript Runtime Error

user3685331I've added execjs and therubyracer to my gemfile already and downloaded node.js but I'm still getting this error: C:/RailsInstaller/Ruby2.0.0/lib/ruby/gems/2.0.0/gems/execjs-2.1.0/lib/execjs/run times.rb:51:in autodetect': Could not find a JavaScript runtime. See https://gi thub.com/sstephenson/...

0
Q: No need to specify the port in the URL in a Node.js app

son_cativoI have deployed my node.js application on a commercial hosting. Since I have no super user permissions, I can't to listen on port 80 and I am forced to explicit the port they assign me in the URL to access the application. Is there any way to avoid this?

21:23
0
Q: How to make Teacm City release the exe once node starts

ExitosI am trying to get a node.js application working on a CI server (Team City). I have a build step which goes like this... npm start "path/to/my/app" And it works however the build step hangs because the console will not shut down (it can't because it needs to stay open to run the server). So wha...

21:34
0
Q: Elastic Beanstalk SQSD Error on worker start

otaviosoaresI've deployed a nodejs worker. However whenever I try to start it, it gets red and this error is showned: ERROR Instance: i-6eef007a Module: AWSEBAutoScalingGroup ConfigSet: null Command failed on instance. Return code: 1 Output: Error occurred during build: Command 01-start-sqsd failed . I do...

0
Q: Express 4 and socket.io

Chad PendergastIn the past, listening servers would be created in the app.js file so when you wanted to run your server you would use this command. node app.js I have recently gotten back into nodejs and am now having difficulty because in the past when I would listen to the server with my sockets like so - ...

21:59
0
Q: Is there a version of assert.deepEqual that does strict (===) equality checking?

SahandI was hoping assert.deepStrictEqual would exist but it doesn't. Is there an equivalent in either node.js itself or a library?

0
Q: Deploying a Sails.JS app to Heroku with asset injection (--linker option)

dbaschI am trying to deploy a Sails.JS app to Heroku with asset injection (--linker option), //Use the activityOverlord example: git clone https://github.com/irlnathan/activityoverlord.git npm install //Push the distribution to Heroku with git git push heroku master But there are errors. The in...

22:11
0
Q: Mocha testing Mongoose times out

Josh C.I am trying to write integration tests using Mocha against a feathers service and a mongoose model, but I get a timeout: Error: timeout of 2000ms exceeded. In my describe(...), I have made sure to call mongoose.connect(...), but it doesn't seem to make a difference: before(function (done) { ...

0
Q: Safely restart nodemon after unhandled exception

AgzamI'm using gulp and running nodemon from a task. Everytime it detects changes it restarts the server runs "build" task Yup in that order. Couldn't figure out how to kick "build" task before nodemon's restart happens (setting delay param didn't help). nodemon = require "gulp-nodemon" runS...

0
Q: Production Node Application Can't Find SVG Files

ac360In my local development application the svg files show up just fine with the following code (The curly brackets embed Angular.js variables): <img ng-src="img/servant_{{servant.personality}}.svg" draggable="false"> But when deployed on Heroku, the SVG files result in a 404: Failed to load reso...

23:06
0
Q: google cloud storage and angularjs

Harry MorenoI'm building a mobile app with html/js/phonegap/angularjs. I would like my users to be able to upload photos from their phones directly to google cloud storage. How do I do this? I've seen this jwt stuff https://developers.google.com/accounts/docs/OAuth2ServiceAccount but I've also found this app...

23:18
0
Q: How to separate routes on Node.js and Express 4?

user227719I want to separate Routes from my server.js file. I am following this tutorial on Scotch.io http://scotch.io/tutorials/javascript/build-a-restful-api-using-node-and-express-4 It is working if all lines are on server.js file. But I am failing to separate. How can I make this work? server.js /...


« first day (11 days earlier)      last day (66 days later) »