0
votes
0answers
6 views

executing linkchecker.exe with grunt-exec and powershell

I 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: ...
1
vote
1answer
16 views

writestream and express for json object?

I 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 ...
0
votes
1answer
7 views

nodemon & nodeclipse wont autorestart on file change

I 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 ...
3
votes
0answers
23 views

Node.js and Request - limiting the file size of downloaded file

I 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) ...
0
votes
2answers
15 views

Create a permission based system

I'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 ...
1
vote
0answers
12 views

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?

Let 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 ...
0
votes
1answer
13 views

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

Sorry 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 [...] ...
0
votes
1answer
9 views

Socket.io connecting/disconnecting strange behaviour

I'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 ...
0
votes
1answer
13 views

How do I remove documents with Node.js Mongoose? [duplicate]

FBFriendModel.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
votes
0answers
19 views

MEAN stack advantages [on hold]

What 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
votes
1answer
14 views

Sending file with nodeJS on apache

I'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 ...
1
vote
0answers
11 views

emberJS mixin super override

How 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", { ...
0
votes
0answers
13 views

send emails with nodejs nodemailer and exim

I 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 ...
0
votes
0answers
8 views

streaming directly from browser into Flashplayer or mediasource?

I'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 ...
0
votes
1answer
47 views

what is the difference between require and require

What is the difference between these two with and without almond? require('module'); require(['module']); Edit which are nested: define(function() { require('module'); } define(function() { ...
0
votes
2answers
49 views

What is the best practice for multiple $http request in AngularJS?

For 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? ...
0
votes
3answers
27 views

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

I 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 ...
0
votes
0answers
11 views

Where is self.emit emitted?

I'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 ...
0
votes
0answers
20 views

How to implement Rooms and Namespaces like Socket.io?

I'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 ...
0
votes
0answers
16 views

Node: css,images not working fine upon loading php script

Hi 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 ...
0
votes
0answers
11 views

Calling a function from a page on layout with EJS

I´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: ...
0
votes
0answers
17 views

mongodb unexpected behavior when saving subdocs

I do this after a mongoose .find query: data2[0].videos[temp].markModified('fakeName'); data2[0].save(function(err,product,numberAffected){ if(err){ console.log("error saving manifest") ...
4
votes
0answers
59 views

Sharing code between AngularJS and Nodejs

What is the best way of sharing code between frontend and backend using javascript, specifically saying between nodejs and angularjs? Thing is that we are using same enums and constant values such as ...
0
votes
0answers
11 views

Meteor.js i18n package does not work when deployed with MUP (meteor-up)

A meteor app is using the tap-i18n (https://github.com/TAPevents/tap-i18n/) and tap-i18n's setLanguage function works on the development system. However when the app is deployed to the production ...
0
votes
0answers
23 views

NODE JS: How to change include path?

I have a problem that when i want to compile a package, that its looking for the wrong version. Here is a picture where its all explained -> http://puu.sh/az4Yp/95f544a7fb.png C:\Program Files ...
0
votes
0answers
10 views

Sequelize js node Transactions

I'm recently new to nodejs and sequelize right now I'm a bit confused how to use the transactions of sequelize. My project launches events that can call both at the same time events,here is a ...
0
votes
0answers
10 views

Clarification on MEAN.io assets and aggregation

I am having some difficulty to understand the whole js and assets aggregation process in MEAN.io (mostly because I don't know JS and Node well enough). I really like the way things are organized in ...
0
votes
4answers
70 views

Javascript how to execute code after for loop completes

I'm trying to work through this js/async scenario and i'm trying to know how the rest of the js world handles this. function doStuff(callback) { cursor.each(function(err, blahblah) { ...doing ...
0
votes
1answer
26 views

Node require returns undefined

I have an ErrorHandler class in my node code that handles all occuring errors. Every Error has its own class. All classes are placed in seperate files so the folder structure is: ErrorHandler.js ...
0
votes
3answers
39 views

Looping over objects in array and adding property to each

I'm getting an array of files, and then I want to add the date and size properties to each of those file objects, but using the code below, they don't get added. I know that's my fs.statSync(p + ...
0
votes
0answers
18 views

Do Not Track implementation in express app

I want to add a function called "consent" that uses the functionality called Do Not Track (DNT) from browsers. The function role is to add Google analytics on rendered pages when DNT is not active or ...
0
votes
0answers
16 views

output sanitation when displaying content from node server in angularJS

There are so many suggested ways to do sanitation with this stack (angularJS with a nodeJS backend) that I'm not sure what to My angularJS web app makes calls to a nodeJS server in order to get info ...
0
votes
0answers
7 views

Update record using NodeJs Connect-rest

How do I go about updating a record using PUT with from below function body using connect-rest. I want to update oldtimestap with newtimestamp: module.exports.getItem = function(callback, id) { var ...
-4
votes
1answer
16 views

Node.js server side application starter

I am starting a new Android app, and I would like to know what should be the best server-side stack that I could use. I heard some about MeanIO, MeanJS, Cleverstack, Generator Angular Fullstack. ...
1
vote
1answer
14 views

Parse data-i18n attributes in html element

I am trying to parse 'data-i18n' attributes from html files with custom regex (also with the default i18n.t function): i18next modules/ -o lang/ -r ...
0
votes
1answer
19 views

How to get huge string data from http(GET) response using node js without buffering?

I am trying to get XML as string by calling HTTP GET (REST) from node js. I think the server sends the response only once but node receives it in chunks as it comes to res.on('data') multiple times. ...
0
votes
1answer
38 views

What does “this” mean in a nodejs module?

Codes like the following: var fs = require('fs');//.etc //{} console.log(this); module.exports = {sayyou:1,sayme:2}; I know that "global" is the default context as 'window' in browser,but what is ...
0
votes
1answer
29 views

Using functions with express.js “locals”

Coming from a Rails/Sinatra background, I won't feel at home without being able to use helper functions in my view files, however achieving this in express.js has proven quite difficult. You can set ...
0
votes
0answers
11 views

Mongoose (v3.8.14) - doc.validate() thinks every value is undefined

Mongoose v3.8.14 I cannot seem to get the doc.validate call to work. I fetch the document using findById (also tried findOne) and then do a doc.validate() call and it tells me that 'title is required' ...
0
votes
1answer
40 views

Sending javascript variable on res.render - express

I'm trying to build a small app to call from a config.js file containing JSON and write that data to a page based on the name key within the JSON. app.get('/:verb', function(req, res) { ...
0
votes
1answer
18 views

Store date/time of last received REST call in NodeJs

I'm have written an REST API in NodeJs Connect-rest and I was wondering how to go about storing the date and time the last call was made. Here is the GET url call ...
0
votes
1answer
15 views

With BrunchJS do I need Node server on production?

What BrunchJS docs don't clearly tell is that after the assets have been built for production do I need to have Node on the production server? Although this confusion is most likely because these are ...
2
votes
2answers
55 views

loading the php file on node

Hi I'm trying to develop a chat system using socket.io, express.io and node.js everything is going smoothly, and I have been following the documentation from them. The problem is as soon as I'm ...
0
votes
1answer
23 views

MongoDB/NodeJS query to get data from dictionary

Hi in mongo DB I have a table "games" like this: { "_id" : ObjectId("53c66f922e15c4e5ee2655af"), "name" : "alien-kindergarden", "title" : "Alien Kindergarden", "description" : "Alien description", ...
0
votes
1answer
30 views

Express.js create URLs from MongoDB ID

I'm new to node.js and express.js. I'm trying to create a todo app that works like this: I have a mongodb of Todos containing individual todo lists. These lists have tasks classified as unfinished or ...
0
votes
1answer
16 views

How do I define a callback function in an outer scope using Node.js?

I've this code: for (i in namespaces) { namespaces[i].on('connection',handleConnection(namespaces[i])); function handleConnection(ns) { return function (socket){//connection ...
0
votes
1answer
19 views

Firebase Countdown Timer Synched Across Multiple Clients

I am going to take a crack at building a penny auction site for a specific niche using angular JS. I am trying to plan the countdown timers and i've been itching for a reason to try out firebase. I ...
0
votes
1answer
24 views

Mongoose dynamic mongodb collection name

I am using mongoose driver for mongodb on node.js. I have a schema as below. Using db.model I can get the model with the hardcoded collection name "aggregation". It works fine. But how do I use the ...
-1
votes
0answers
30 views

Can't figure out why this won't work. Node beginner [on hold]

I am new to node. I am using Jade Express. I don't know why this JavaScript file won't work on the webpage. There are errors with ace.js, however the errors only appear on Eclipse, when I open ace.js ...
0
votes
1answer
22 views

How to use Grunt without compressing everything into a single file

I'm using Grunt for the first time. Someone else has already setup/configured the Gruntfile.js configuration file. Although it works, what I find incredibly annoying is that all my js files are ...