« first day (76 days earlier)    last day (1 day later) » 

12:00 AM
0
Q: Calling a function from a page on layout with EJS

Luis SpecianI´m in the process of migrating a play framework application to node.js, express and ejs, I would like to emulate somehow moreStyles and moreScripts, I´ve tried something like this, without success: layout.ejs <body> <%- body %> </body> <%- moreScripts() %> index.ejs <% layout('layout') -%> <...

 
12:37 AM
0
Q: Underscore symbol ("_") becomes undefined in nodeJS command line interface

Steve Bennett$ node > _=1 1 > _ 1 > _ 1 > undefined That is, the _ variable seems to become undefined after a single command which doesn't reference it. By comparison: > ubuntu@tm-dev /usr/share/tilemill $ node > a=1 1 > undefined > a 1 > Is this normal? Why does it do this? (It's making it a bit har...

 
1:25 AM
0
Q: Node: css,images not working fine upon loading php script

user256009Hi Tried few tutorials on running php on node from this site scriptol.com so I was successful on loading the page but the problem is that some of the images did not loaded and the css rule is not also running any idea why? Here is my code for running the server under node: http = require(...

 
1:49 AM
0
Q: airplay-js no start streaming

Mikel David Carozzi Sanchezim writing a local file streaming over airplay protocol with subtitle support, to do that im using ffmpeg and the process works really fine, but the main problem is when try to start streaming after burning the subtitle, the airplay doesn't work, but when i comment the lines that do the burning w...

 
 
1 hour later…
2:55 AM
0
Q: Cannot generate the socket.io.js file

SivaDotRenderI am trying to implement a socket.io server. I know that the socket.io.js file is suposed to be automatically generated by socket.io for the client side. This is however not happening in my case. Here is my code: var express = require('express'); var app= express(); var server = require('http'...

 
3:13 AM
0
Q: how can i reopen mysql after end()?

PangoSeacode as follows: var mysql = require('mysql'); var connection = mysql.createConnection({ host : 'localhost', port :"3306", database :"mydb", user : 'root', password : '007007', }); var isCon = true; connection.connect( function (err) { console.log(isC...

0
Q: Storing Accounts and Dealing with Spam, Persistancy vs. Cleanliness

user3780839So my partner and I are working on a mobile app which requires registration, thus sending registration information back to a web service we have written in Node.js to handle the registration information and store it in MongoDB. This is (we believe) standard protocol, except recently we have a dif...

0
Q: How to implement Rooms and Namespaces like Socket.io?

Smarty TwitiI'm using https://github.com/einaros/ws, i can't use Socket.io because i'm working with an IDE(drag and drop) and it uses native WebSocket(on client side) so no websocket wrappers are allowed (on server side).. My needs as the follow(basically same as Socket.io): 1) Clients Makes/join/leave ro...

0
Q: How can you persist user data for command line tools?

Bryce JohnsonI'm a front-end dev just venturing into the Node.js, particularly in using it to create small command line tools. My question: how do you persist data with command line tools? For example, if I want to keep track of the size of certain files over time, I'd need to keep a running record of chang...

0
Q: How to download express documentation

MAGHow can i download full api reference to express so that i can understand and code on localhost while i am not connected to internet http://expressjs.com/4x/api.html#express This site has all api references but i am unable to download . I tied command wget --recursive --no-clobber --page-r...

 
 
1 hour later…
4:56 AM
0
Q: IronPython/EdgeJS Import Exception __future__

Singular1tyI'm using EdgeJS with IronPython to run a Python script inside my NodeJS server, but IronPython is having trouble importing a module. I'm getting this error: System.Reflection.TargetInvocationException: Exception has been thrown by the ta rget of an invocation. ---> IronPython.Runtime.Exception...

 
5:13 AM
0
Q: How to convert this Backbone Marionette module to node module exports

user2825384I am in the process of converting a Marionette app from code which is all enclosed in Marionette modules to node js module exports so that I can use node and browserify in my project. However when it comes to my 'Entities' module I am struggling to come up with the correct solution of how to hand...

0
Q: Where is self.emit emitted?

ECMAScriptI'm using IRC npm and my bot hasn't been connecting to an IRC server and I wasn't receiving any errors. So I went into the source code to find out what was happening. Apparently the function was ran. Where is it being emitted? And I found this: util.log('Connection got "close" event'); W...

0
Q: How to actually deploy a node.js (or django) project on a hosted web server?

SunnyDI know this question may seem stupid but I've been googling and asking this question for a while since I decided to start learning node.js. Ok so I have a hosted web server over at X10Hosting (https://www.x10hosting.com/) and I'm wondering how I could host a simple node.js web app on it. Thanks, ...

0
Q: Node: Error in installing npm package

ZAyn AliI'm trying to install node.js package with npm but it's giving me that error. Error: ENOENT, stat 'C:\Users\Zain\AppData\Roaming\npm

0
Q: What is the best parctise for multiple $http request in AngularJS?

user2847910For example, I have a controller to show user a list view, some columns need data comes from another endpoint, so I wrote these with intuition, could you tell me how do I re-factory them? $http.get($scope.urlA) .success(function(res){ $scope.dataA = res.data; $http.get($scope.urlB) ...

0
Q: Node.js Express nested resources

francoi'd like to nest resources like the below eg. /// fileA.js app.use('/dashboards/:dashboard_id/teams', teams); [...] ///teams.js router.get('/', function(req, res, next) { [...] } but I can't get the req.params["dashboard_id"] parameter in teams because it seems it is already substituted with ...

 
5:43 AM
0
Q: what is the difference between require and require

facebookWhat is the difference between these two with and without almond? require('module'); require(['module']); former gives a requirejs error (that suggests to use the ladder). The reason i am asking is, I am studying example-libglobal on how to build a lib that can be used as an AMD module. The ...

0
Q: Need help in node.js Jade

nijiI would like to seek help on displaying mySQL records in node.js Jade. I have followed the basic tutorial of node.js Jade and able to get it work by displaying default index.jade but when I start to implement mySQL connection link and function in my index.js, it display none and shows no data rec...

 
6:01 AM
0
Q: What are recommended stacks for building a Bitcoin exchange?

GeorgeI'm looking to build a Bitcoin exchange website, similar to Bitstamp, and I'd like to know what kinds of technology stacks are recommended for real-time Bitcoin transactions. I'm well-versed in PHP and LAMP stacks, but I'd like to consider all my options before I start. I'm also dabbling around...

 
6:13 AM
0
Q: MEAN Stack socket.io pushing to client when existing data gets updated

user1772861I am working on a MEAN & Socket.io project where Mongodb in the back-end holds my data and I am using socket.io to publish newly arrived data to all the clients. To make it real time, I am using Mongodb capped collection to send newly arrived data (Insert) to all the clients using socket.io emit....

0
Q: Gruntjs with grunt-nodemon, watch and jshint

mdvim trying to run GruntJS with those 3 plugins so it can watch for changes and first: lint the file and then reaload express server. My problem whith the config below is that if jshint lint the file, nodemon doesen't run and viceversa. // Gruntfile.js // our wrapper function (required by grunt a...

 
6:59 AM
0
Q: streaming directly from browser into Flashplayer or mediasource?

TAllen WeavI've tried my best, but after a month of no progress I need a bit of help. I've tried to stream an arraybuffer, containing partial bytes of an mp4 video, into the HTML5 tag using the MediaSource api. Needless to say, it's been difficult, and I haven't been able to get the video to play at all. ...

 
7:10 AM
0
Q: How to do asynchronous processing in nodejs

Srinivas KothuriI'm a newbie in node js and trying to build a simple app to build web pages from RSS feeds. http.get('http://www.someurl.com/news?output=rss', function(res) { res.on('data', function(chunk) { resLength += chunk.length; chunks.push(chunk); }); res.on('end', function(c...

0
Q: execute a bat file using nodejs

Pslam trying to execute a batch file using node js i used following code it is not working. var path = require('path'); var spawn = require('child_process').spawn; var exec = require('child_process').execFile; var start = function () { exec("D:\\test_automation\servers\vms-s...

 
7:34 AM
0
Q: send emails with nodejs nodemailer and exim

user1835337I have nodejs app that uses nodemailer to send Emails with gmail, I need to change it to works with EXIM. I have simple script that can send an email from command line - how can I impliment it to the nodemailer? script: var sys = require('sys') var exec = require('child_process').exec; function...

 
7:58 AM
0
Q: Node js in Linux Embedded

user3898541Hi I'm trying to install nodejs in a Pengwyn board (TI Sitara AM3354 ARM) after installing Yocto Linux successfully. I don't know how to install node inside. I've tried opkg but it shows this error in the MiniCom: opkg_install_cmd: Cannot install package <Packag name's> I'm a bit frustrated a...

0
Q: Invalid characters in JSON.stringified() object

RayjaxI do the following : //Node.js server file (app.js) render(index, {json:{string:"Test GmbH\nTheater-, Konzert- und test\ntße 20
\n51065 Köln\n\nTelefon: test
\ntest: test\n\ntest: test@test.com
"}}) //Template to render (index.ejs) var data = <%=JSON.stringify(json)%>; So that I can ...

0
Q: zeroRPC is not working on raspberry pi

andreaI'm trying to install zeroRPC on my raspberry pi, because i need to make python and node.js programs talk together. I followed this guide for the installation of the environment: http://ianhinsdale.com/code/2013/12/08/communicating-between-nodejs-and-python/ and everything installed successfull...

0
Q: gulp-usemin change output tags

woutr_beI just ran into an issue while using gulp-usemin, I would like to change the output in this particular case. I can see the output is being specified in the processHtml function in the module: html.push('<script src="' + name.replace(path.basename(name), path.basename(file.path)) + '"></script>'...

 
8:16 AM
0
Q: emberJS mixin super override

facebookHow can i override a mixin but still keep the old mixin functionality. I have a mixin that uses beforeModel, and have a route: App.PlayRoute = Ember.Route.extend("beforeModelMixin", { beforeModel: { // Here i want to have mixin beforeModel functionality as well as my own hook. }...

0
Q: Sending file with nodeJS on apache

JochemQueryI've a setup of apache (usbwebserver) and nodejs (both latest versions). I changed the httpd.conf (as described here http://stackoverflow.com/a/18604082/1112413) HTTPD.CONF ProxyPass /node http://localhost:8000/ APP.JS Current Code: var app = require('express')(); var http = require('http'...

0
Q: Need help in my LED Switch REST API

nijiI would like to seek help on my LED Switch REST API. I have created my own REST API and able to light up my LED when I type in the URL for example: localhost:3030/7/1 to light on and localhost:3030/7/0 to light off. But when I start to implement a switch to manually on and off my LED without keyi...

 
9:10 AM
0
Q: Using require.js to collect and inline npm-installed modules into front end JS files

wal-o-matI have a project and installed for example underscore and marked via npm install. When I launch node in my project root folder, I can require both with var __ = require("underscore"), similar for marked. This is how I use both libraries in my backend, if needed. Now I want to write a myscript.js ...

 
9:24 AM
0
Q: cpanel host are support node.js

vasanthangel4i have planed to develop in node.js for my new project. any body already implemented means kindly shre me. any other host is support node.js?. I have already seen this question, but the answers don't seem to be convincing.

 
9:48 AM
0
Q: MEAN stack advantages

cj91rsWhat type of apps are good to build with a mean stack. What are the advantages of a nosql database? Any useful suggestion would be greatly appreciated, as I am considering learning node js.

0
Q: 'nodejs web.js' works, 'foreman start' doesn't

Yair TalI am developing a website, which I want to deploy on localserver/heroku/aws On localserver and aws, when calling 'nodejs web.js' port 3000 works find. When doing 'foreman start' it gives the feedback of listening to port 3000, but the browser doesn't show the site. Not on aws, and not on a loca...

 
10:12 AM
0
Q: Regarding process related issues in node js and mongo db

SanjuI am a novice programmer in Node JS. I have a few queries regarding process related issues like locking and race conditions in Node JS and Mongo DB. My codes are working perfectly in local environment,but when I am moving to production and come across large number of requests,I might encounter c...

 
 
1 hour later…
11:17 AM
0
Q: How do I remove documents with Node.js Mongoose?

user3652050FBFriendModel.find({ id:333 },function(err,docs){ docs.remove(); //Remove all the documents that match! }); The above doesn't seem to work. The records are still there. Can someone fix? Thanks.

0
Q: Socket.io connecting/disconnecting strange behaviour

user3519836I'm experimenting with node.js / socket.io and came across some strange things when connecting and disconnecting to the socket.io server. Socket.io version 1.0.6 Node.js version 0.10.29 Express version 4.7.2 I'm storing my connections to a JavaScript object/array that I declared at the top of a...

0
Q: Node.js and HBase on Azure (HDInsight)

user3122267I am trying to access HBase on Microsoft's Azure from Node.js. I looked at different libraries such as bhase and also the REST API (webhcat). What I want to achieve is to create a table and and upload data from Node. Later I want to do queries on this dataset. Unfortunately the documentation from...

0
Q: How does requiring modules manually differ from calling them dynamically with browserify?

rich97Sorry for the awkward post title but it's a very weird situation to be in. In my project I have a folder structure like so: /filters index.js [...] /controllers index.js [...] app.js app.js is basically the entry point of my application and I thought it would be cool if I c...

0
Q: Mongodb aggregate by date with empty daybins

user2205763I am trying to do a per-day aggregation in MongoDB. I already have an aggregation where I successfully group the data by day. However, I want to do the aggregation in such a way where days with no data show up, but empty. That is, they are empty bins. Below is what I have so far. I have not been...

0
Q: How to handle concurrent requests correctly?

Martijn19Let's say I have some sort of game. I have a buyItem function like this: buyItem: function (req, res) { // query the users balance // deduct user balance // buy the item } If I spam that route until the user balance is deducted (the 2nd query) the user's balance is still positive. ...

1
Q: Using Node.js file system is it smarter to run through 80 files looking for a property than it is to run through conditions in one file?

adamgedneyLet me explain: I am building a node.js project that needs to check if dates match or fall within a range. If there is a match, I need to store a reference to the path of a file on the server. There are about 80 of these files. They are configurations. I can write a giant condition in a function...

0
Q: Create a permission based system

ECMAScriptI'd like to create a system where there are maybe 4-5 types of user groups that can access certain things. The higher the permissions, the more they can do. That's simple to make for me, but the hard part for me is to create the system where the higher ranks can do anything lower ranks can, but l...

 
12:11 PM
0
Q: Meteor publish method

NeeleshI just started the Meteor js, and I'm struggling in its publish method. Below is one publish method. //Server side Meteor.publish('topPostsWithTopComments', function() { var topPostsCursor = Posts.find({}, {sort: {score: -1}, limit: 30}); var userIds = topPostsCursor.map(function(p) { retur...

 
12:23 PM
1
Q: Node.js and Request - limiting the file size of downloaded file

PonoI want to download a file with the Request library. It's pretty straightforward: request({ url: url-to-file }).pipe(fs.createWriteStream(file)); Since the URL is supplied by users (in my case) I would like to limit the maximum file size my application will download - let's say 10MB. I coul...

 
12:35 PM
0
Q: nodemon & nodeclipse wont autorestart on file change

SydI managed to setup nodeclipse with nodemon and I can now start my server.js script with monitor (nodemon) but something strance occurs: On file change (even on the server.js) nodemon wont restart In nodeclipse console I dont see the normal nodemon output, ex: 1 Aug 15:20:05 - [nodemon] v1.2....

0
Q: Speed issue with Jasper Reports

user3899343It takes me ~1.5 mins for my jaspersoft reports/dashboards to load - is there anyway I can speed it up ? I use Jaspersoft Studio 5.6 to create dashboards / reports out of data sitting in a private cloud (connection using VPN). The private cloud has 2 nodes (name node, storage node). use the stor...

0
Q: SailsJS - Helper Module to create links

Marcelo Boeira Jr.I want to create helpers ... like function linkTo (value, href, options) { ..... } But I want this to be global, so I can use to put the links at my views files, <%= linkTo('link','/controller/action') %> Instead of <a href="/controller/action"> Link </a> Should I use a service?

0
Q: My REST API endpoint handles 50 req/sec with avg response time 1300ms - is it slow?

user606521My API endpoint fetches some data from DB and returns to user (2.8KB gziped). I load tested this endpoint with 50 concurent connections per each second (loader.io, app hosted on heroku, build with node.js) and avg time was ~1300ms. Is it normal, slow, very slow? I know that it depends on DB quer...

0
Q: Openshift Websocket custom domain

user3542165I've recently changed my openshift default domain myapp.rhcloud.com in www.myapp.com with a custom ssl certificate. The config works perfectly well until the web page ask the server for a websocket connection. I use node with socket.io and websockets enabled I first tried: io.connect(https://ww...

1
Q: writestream and express for json object?

user2457035I might be out of depth but I really need something to work. I think a write/read stream will solve both my issues but I dont quite understand the syntax or whats required for it to work. I read the stream handbook and thought i understood some of the basics but when I try to apply it to my situa...

 
1:11 PM
0
Q: Express : Custom node_module on Heroku

Ruff9I'm using the Poet module in an Express app. Poet don't support Expresss 4 yet, but a patch exist, a change in the module code. I applied that patch, and my app is working locally. But Heroku load the original version of the package, without patch. How can I apply the change to my heroku app ?

0
Q: executing linkchecker.exe with grunt-exec and powershell

mlesI want to include my linkchecker test into grunt. I can execute it just fine with powershell & 'C:\Program Files (x86)\LinkChecker\linkchecker.exe' http://localhost:3000 This is my Gruntfile: Sorry about the screenshot, but SO thinks my code is not properly formated when I paste it in here....

0
Q: Mean.IO +Grunt - Configure as unix service

Robson XimenesI have an Mean.io app (node.js, expresss, grunt); All fine on my own machine, I run with grunt command at the app root. I need to install it on a server (CentOS) someone can give a clue?

 
1:35 PM
0
Q: NodeJS Express: Pattern for common data elements on every page

user548084Is there a recommended pattern for page elements that are persistent and common across all pages on a site? For instance, a "total units sold" on the top of every page. You would cache that value and update the cache every hour or so, but where would you actually retrieve this value and pass it t...

0
Q: Node "req is not defined"

Ibrahim ApachiWhen I try to start following script: var http = require("http"); http.createServer(function(request, response) { response.writeHead(200, {"Content-Type": "text/plain"}); response.write("Hello World"); response.end(); }).listen(8000); var ip = req.headers['x-forwarded-for'] || req.connec...

 
1:53 PM
0
Q: Grunt Watch no running task for JS or CSS

MddI am not sure why my grunt-watch is not running for the JS or CSS configurations Here is my CSS folder structure: -css --src ---styles.css ---third-party ----bootstrap.css Here is my JS folder structure: -js --src ---app.js ---third-party ----jquery.js Here is my package.json { "name": "m...

0
Q: Swig Template CLI + Browser Usage + Custom filters

Aitor Aznar ÁlvarezI'm trying to use Swig template for Nodejs in the browser. The requirement: I need to use custom filters in my precompiled templates with Swig CLI. The issue: The result of my compilation doesn't have the custom filters functions and I get the an error. The steps I've made 1- Compile the te...

0
Q: Socket.io (1.x) .to(room) not working, but works without

Dale InverarityI'm building a simple messaging server and it works perfect using the socket.broadcast.emit() however if you use the socket.boradcast.in(room).emit() it dose not connect up. I've include the server code and client code below. server var app = require('express')(); var http = require('http').Ser...

0
Q: gulp.watch error: `write after end`

Olivier ClémentI am getting different results for different gulp.watch instruction When I execute my watch task and change an .html file, everything works correctly (tasks defined below) But when I change any other files (.coffee, .less, etc) I get this error: stream.js:94 throw er; // Unhandled strea...

0
Q: AJAX or Socket.IO make more sense in my situation?

user3404465I have been working on something using AJAX that sometimes requires a couple POST's per second. Each post returns a JSON object (generated by the PHP file being posted to, ~11,000 bytes) and on average the latency is between 30ms and 250ms depending on if i'm on wifi or wired, but every roughly 1...

 
2:23 PM
1
Q: NodeJS + Websockets + HTML5 video tag and 'streaming'

KiksyI'm trying to stream a large video file to the browser in a <video> tag using websockets. The video plays fine, but it always waits until it's downloaded the entire video before playing, resulting in a large delay. Setting autoplay = true and preload="none" seems to have no effect on this. So I...

1
Q: mongodb db.open() returns replicaset error but no error in mongodb log files

RajivNodeJS version: v0.10.29 Mongo version: 2.6.3 NodeJS mongodb module: 1.4.5 We are getting the following error in the callback to db.open "Error: No valid replicaset instance servers found" The mongodb seems to be working fine and there is no error in the mongodb logs. Restarting the nodejs se...

0
Q: Building an PHP XML string (with addChild()) and loading it on other pages

user3899686I created an XML string with the following code: $xmlstr = <<<XML <?xml version='1.0' standalone='yes'?> <product_list> </product_list> XML; Then I included this php file into another php page, and work with the addChild() to insert a new node. include 'xml.php'; $product = new SimpleXMLEleme...

0
Q: grunt + rsync-2 permissions error throws grunt a fatal error

ScreenackMac OS X 10.9.4, Node v0.10.30, npm 1.4.21, grunt 0.4.5, grunt-rsync-2 0.1.3 When I run an rsync-2 task with grunt, I see the error: rsync: failed to set permissions on "<path info>": Operation not permitted (1) rsync error: some files/attrs were not transferred (see previous errors) (code 23) ...

0
Q: how to use environment setting in jade+express

user3047050I am using jade with express. In jade i want to inline css for production and link it for development mode, as shown below - if(environment === 'development') { link(rel="stylesheet", href='styles/style.css') - } else { style(type="text/css") ...

0
Q: How to use node-http-proxy as a proxy server for multiple secure servers

Ryan JarvisI currently have a HTTPS web server listening on port 443 on my host machine. My goal is to set up another HTTPS web server on the same host machine, change ports on both web servers, and then set up a proxy server using node-http-proxy listening on port 443 instead. The proxy server then deleg...

0
Q: Node as Socket Client How to get all the data

DaleOk so I am working on this idea to make a socket service to a server that exposes a older DB via JDBC. The idea is to have the client pass a SQL string on the socket and get back the data ion JSON. Kinda of a poor man's database driver. Queries that return large amount of data are sent in chun...

0
Q: Unable to run telecope / meteor

user3899792Im trying to follow the instructions from http://www.telesc.pe/docs/installing-telescope/ Managed to install node.js and npm using the link on the page. I have also installed meteor and meteorite. I have also pulled the latest uddate using git clone git@github.com:TelescopeJS/Telescope.git I can ...

0
Q: How to inflate part of string

RobinvdVleutenWhile building a NNTP client in NodeJS, I have encountered the following problem. When calling the XZVER command, the first data I receive from the socket connection contains both a string and an inflated string; 224 compressed data follows (zlib version 1.2.3.3) ^*�u�@����`*�Ti���d���x�;i�R��ɵ...

0
Q: Random behavior with adm-zip and nodejs server

billcaneI'm trying to build a zip archive with a node.js server that used adm-zip to compress all the files. Server uploads an .svg file, and try to send a response to the user with a .zip archive composed of .ttf, .woff & .eot files (looks like what Fontsquirrel's webkits do). The problem is that somet...

 
2:59 PM
0
Q: NodeJS / Express / MongoDB - How Do I Limit Accepted Parameters in a POST Request?

Lloyd BanksI have a NodeJS server running on Express. I am using MongoSkin to connect my web server to MongoDB. I have the following route: var express = require('express'); var router = express.Router(); router.post('/add', function(req, res){ var db = req.db; db.collection('products').insert(r...

0
Q: Supervisord workers get stuck after a long period of inactivity (no requests)

user1220833I'm going thru a weird issue and I don't know where to look to find the problem. For web projects I use this architecture (Ubuntu Server, by the way): Nginx as reverse-proxy / load-balancer Supervisord to manage workers gunicorn (in case of Python/PostgreSQL projects-TG2, Pyramid, etc) / NodeJ...

0
Q: node.js download file with free public proxy

wikontI would like to write an application using Node.js. The purpose of application is to download the file specified in URL, by giving the URL parameter. For instance, I would like to download .png file in URL http://i.cdn.turner.com/cnn/.e/img/3.0/global/header/intl/CNNi_Logo_new.png. I can write th...

0
Q: Is it possible to send a Google hangouts chat message using node.js?

FluffyI'm looking for a way to send a message to the new Gmail chat window - Google Hangout apparently. I'm aware XMPP is supported for old-style chats, but is there an API to send anything using Google Hangouts from node.js?

 
3:13 PM
0
Q: OpenShift socket.io : express deprecated app.configure: Check app.get('env')

Marcus KirschAfter having set the client and server side of socket.io to what I think are the right links, now something else sprung up. My assumption is , I am using an old express version or one that is too new for the code I have ??? DEBUG: Program node server.js exited with code 0 DEBUG: Starting child...

 
3:25 PM
0
Q: Node.js Twitter Passport Authentication

Callum BonnymanOk so i've been using this as a guide and i've got my app working despite not having the exact same code. I can go to /auth/twitter and it will authenticate via twitter and return to the /profile url which I guess means it's worked. It also created the database object so i'm guessing that worke...

0
Q: socket.io / parameters on connection

ceadreakIn my node.js / Express.js app, I need to pass parameters with the socket.io connection (saw that in another post). On client side, I have something like : var socket = io.connect('/my/namespace', {query:"param:value"}); On server side : io.of('/my/namespace') .on('connection', function ...

0
Q: Insert geometry values in mysql using node.js

СалманI am using https://github.com/felixge/node-mysql module with node.js. Mysql table has a field of type POINT. The module requires to send array of arrays to insert bulk records. But It doesn't seem to have option to specify data type. So naturally, the following gets enclosed in quotes var loc ...

 
3:43 PM
0
Q: Should one account for CNAME records when resolving addresses?

modchanMy web application receives from untrusted user some unfiltered string, and then has to determine, if this string, when used as hostname, somehow resolves to IPv4 or IPv6 address in forbidden range, determined by set of predefined rules. So, in case string appears to be IPv4 or IPv6 address (eit...

 
4:00 PM
0
Q: node, Windows and C++

Renny BarrettI'm having a really hard time trying to get some node modules to install on various platforms, including: Windows 7; Windows 8.1; and Windows 2008 Server. For example, if I try to run "npm install bson", on some machines the install works perfectly, but on other machines I get various arcane ...

0
Q: node.js, restify - handle a parameter of type array

roi.holtzmanI have a node.js server with restify. I want to send it a get request that has an array of names in it. I think the request should look like this (but I am not sure about it): /users?names=bob,joe,michael,joey Is this query correct? How do I get the names I send on the node.js server?

-1
Q: How do I Use Forever With Express to Keep a NodeJS Server Running?

Lloyd BanksI have an Express NodeJS server that I manually start through terminal with npm start in my project root folder. I downloaded and installed the Forever package globally. When I run Forever against my app.js file using: forever start app.js my server doesn't start. I am assuming this is beca...

0
Q: How to loop over mongodb array with express and monk to create a page for each element?

Colin RiddellI am building a web app with express, nodejs and monk. I am trying to create a page for each element of an array in my mongodb database. That data is already in the collection called collections with the key coll_list like so: { "_id" : ObjectId("53dbaefd3d85d57492506f1f"), "coll_list" : [ ...

 
4:30 PM
0
Q: Package.on_test runs even when not testing

PatThis is what our app looks like when starting: => Started proxy. => Started MongoDB. >>>>> IN ON_TEST meteor-collection-management: updating npm dependencies -- mongodb... Argh. In meteor-collection-management/package.js (our own package), there is this: Package.on_test(function(api) { ...

0
Q: Why does Meteor-Npm keep trying to get a package from the internet

PatThis is what our app looks like when starting: => Started proxy. => Started MongoDB. >>>>> IN ON_TEST meteor-collection-management: updating npm dependencies -- mongodb... => Errors prevented startup: While building package `meteor-collection-management`: error: Can't install npm dependenc...

 
4:56 PM
-1
Q: Is there anything like socket.io for regular sockets?

Justin808I'm building a socket based server. It does not need websockets as it's not talking to web clients. I would like the server to be clusterable and that means not all sockets are on a single server. I know socket.io handles this with redis and a pub/sub system. I'm wondering if such a library exist...

0
Q: Why use a templating engine for an angular app?

mossI'm just curious if there is any reason to be using a templating engine for a node/express/angular app. I'm new to node and express, so I might be missing something big. But I generally handle templating via angular views.

 
5:07 PM
0
Q: Node JS: Asynchronous for loop, how do i make the for loop wait for function to finish?

KayvarHelp! I'm racking my brain trying to figure out how to sequence this / place callbacks to get what I need. I have a loop that checks for the existence of files. I'd like it to callback when it's done, but the for loop and the callback finish before the "fs.open" finishes... typical asynchronis ...

 
5:18 PM
0
Q: How to get livereload to work with vagrant

Christopher MarshallI have an issue where vagrant forwards port 3000 and Docker/express use 3000 as well. When I add the follow to my Gruntfile, It's obviously using the same port and won't run. (port already in use error) options: { livereload: 3000, hostname: 'localhost' }...

0
Q: How i print hello word in node js?

user3886613I am new in node js.I want to print helo in node js.For print helo,which editor is use?how run node js?plese give me some any basic idea node js.I had installed node js and github.Just type cosole.log('helo'); on github and enter key presssed get helo in github.How create js file node js?how run ...

 
5:48 PM
0
Q: MIddleware run twice

Ayeye BrazoI created a Middleware to get rid of my page request but it seems to run twice... The first time it run has no error and second time has errors... This is my code: app.js file app.get('/:slug', buildingController.findBuilding, buildingController.getBuilding); buildings.js file /** * Creat...

0
Q: How to invoke node package manager from Sublime Text 2

MarkHow I can invoke node package manager from Sublime Text 2? I would like to install/uninstall packages from Sublime.

0
Q: Mongo node expressJs database connections

codenamejamesIm useing a mongo database with node / express and i want to know how could i make this more consise. app.get('/mediums', function(req, res){ db.open(function(err, db) { db.collection('mediums').find().toArray(function(err, info){ res.json(info) ...

 
6:31 PM
0
Q: Rails Asset Pipeline to a Grunt based approach

rctneilI wish to try out Grunt so for a task I have duplicated a project and want to convert it from using the default asset pipeline to work all via Grunt and it's tasks. I can then evaluate both approaches and go for what I think turns out the best. I have disabled the pipeline in my application.rb ...

0
Q: Running jQuery code in MEAN.JS stack

reydelleonI'm starting to work with NodeJS, and more expecifically with MEAN.JS. I'm trying to run some custom JS code, using JQuery, but no matter where i put the code, it nevers runs as expected. This is my script: $(document).ready(function(){ var tooltisp = $('[data-toggle="tooltip"]'); toolti...

 
6:49 PM
0
Q: Redirect http to https in NodeJs app

DinushaI am writing a NodeJs application. I need to secure(https) only the login page. Home page should be non-secure(http). If my domain is www.example.com, If a http://www.example.com request come it should be redirect to https://www.example.com (secure https) After user successfully login to the...

 
 
1 hour later…
7:49 PM
0
Q: Why are the JPG's greatly compressed on my Heroku deployed site?

robmisioWhen I deploy my site to Heroku, the JPG's are greatly compressed. For example, a JPG which should display as about 72k is showing up as 14k. I am utilizing the imagemin grunt plugin to compress the image on deploy, however it compresses the image only slightly (original is about 84kb and it com...

0
Q: Setting a variable for a particular room in socket.io

noleI have a socket.io application. Now, for some needs I want create/set/get variables for a room. Is there any way to do that?

 
8:19 PM
0
Q: node.js dependency issue? http.js:689 throw new Error('Can\'t set headers after they are sent.');

younglionI have a complex node/express app that runs fine locally and on server. When we clone the project on another laptop, we are getting the http.js header error: http.js:689 throw new Error('Can\'t set headers after they are sent.'); I've been through all the answers here and been through the cod...

0
Q: Recreating pack()-type function in Node.js?

user2488234I'm trying to find a suitable Node.js method of recreating the functionality found here: https://github.com/fastly/token-functions Specifically, I'm getting hung up on the "pack()" function (I believe, could be my crypto function?) found across the various languages in the library. Here is my cu...

 
8:51 PM
0
Q: docker elevate user priviledges

Will LopezI'm trying to sudo for a node install: sudo npm install -g grunt sudo npm install -g grunt-cli sudo npm install -g bower The commands error stating to run as an administrative user. How do I do that in the Dockerfile? RUN npm install -g grunt #RUN ln -s /home/dev/spikes/node-esjs-master...

0
Q: Sails.js filtering records using the route

danst_18I am very new to Sails.js and I am trying to understand its magic. I have three nested models using associations : Series.js -> Season.js -> and Episode.js. Series.js module.exports = { attributes: { /* other attributes */ seasons: { collection: 'season', via: 'series'...

 
9:26 PM
0
Q: Setting Up Node.js App Directory

Kevin StachuraI'm completely new to using Node.js and even utilizing the command line, so this question may be extremely elementary, but I am unable to find a solution. I am trying to set up an app directory using Node.js and NPM. For some reason, whenever I try to use the port:5000 I get a "Cannot GET/" erro...

 
9:38 PM
0
Q: Accessing NPM module from Node using admin privileges (sudo)

Traveling Tech GuyI'm trying to write a Node script that makes use of the NPM API. The script works, but requires admin access for certain modules to be installed. I tried running the script with sudo, but it fails on the line requiring NPM. I distilled it to the following simple script: var npm = require('npm'...

0
Q: Synchronous calls in two nested loops

user3421904How can I have Synchronous calls in two nested 'for' loops in Node.JS: Here is my Asynchronous call; I don't know how I can have synchronous version of my code, which goes to next iteration when create_db is done! var new_items = []; for (var key in config.models) { var selected_...

0
Q: stylus nodejs css-parse error

HucI'm new at Stylus, installed nodejs and stylus and all is ok except when I try to convert a .CSS file to .styl with > "stylus -C filename.css" (also tried with --css) on terminal at file folder, I'm working on kubuntu 14.04 , I'd appreciate any help, oh, I also installed all the libraries I coul...

 
9:56 PM
0
Q: Node, Socket.io, and Redis instances

RamselI'm confused about running node with more than one process and how to make socket.io/redis accessible across instances. I'm using socket.io 0.9.16. (1) So everything I write in my app.js file gets run separately in each node instance/process - is that correct? ie., When I create an instance of ...

 
10:08 PM
0
Q: Difference between instance and process

RamselBeen playing around with a node webapp and I don't understand these two terms well. My previous experience is mainly with iOS front-end dev. I'm assuming a node instance is an instantiation of a node object, correct? If that's correct then I understand the concept well. As for a process, I don'...

0
Q: What is flash data?

spinnersI have been doing some tutorials around nodejs. One tutorial mentions a library called "connect-flash" that lets you set "flash data". I have never heard of this term before could someone please define this? (I found the readme rather unhelpful) Thanks

 
11:06 PM
0
Q: Routing site.com to a static file but site.com/anything to something else in Express-JS

Can PoyrazoğluI am new to Parse and I am trying to deploy my app to, say, example.com. I want example.com to serve a static landing page, but example.com/anything (of course, anything is NOT a literal, it can be anything) to be handled by another controller. To make it more clear: Scenario 1: User types www...

 
11:36 PM
0
Q: spawn ENOENT node.js error

FilypeI have started a node.js app with the express-generator, I have a strange issue where I can't view a page via the browser twice, first time it loads fine, second time it doesn't as the ndoe process ends with the following error: GET / 304 412ms events.js:72 throw er; // Unhandled 'error...

 
11:49 PM
0
Q: Getting proxy error when using "gulp serve" when API returns 204 with no content

Jason McClellanI am using Gulp to develop an Angular application generated by Yeoman's gulp-angular generator. I have configured it to proxy requests to /api to another port, the port my API is listening on. That port is actually forwarded via an SSH tunnel to an external server. Here is the config generated b...

0
Q: Node.js async module waterfall - dynamically load and execute functions

BenI am attempting to dynamically load a series of anonymous functions and execute them, passing the results of the previous to the next. Here is an example function: module.exports = function (data) { // do something with data return (data); } When the functions are loaded (they all sit...

 

« first day (76 days earlier)    last day (1 day later) »