Thursday 31 March 2016

Node-GLFW for HTML 5 Canvas App's?

ES6 Import x Require

Hi guys! Trying the new js with express, I got a doubt about the require().In express, I use:app.use('/path' , require('dependecy'));I know, I could import before and then pass the imported dependency, but is there any way to do this with import in a single line?How about the require? Will require be deprecated?

Submitted April 01, 2016 at 12:40AM by ianakiara

BuiltWithMeteor Weekly # March27th2016

http://ift.tt/25yXO48

Submitted March 31, 2016 at 08:16PM by bogdancloud

Declarative Dependencies for Unit Testing Node.JS Services

http://ift.tt/1PIa9Ye

Submitted March 31, 2016 at 08:24PM by emilong

Solving the NPM Problem at Scale

http://ift.tt/22SvYkD

Submitted March 31, 2016 at 07:24PM by joshmarinacci

What do you people prefer, AJAX, Form Posting, ... ???

I've been messing around with node a lot lately and was curious what most of you use to send data from the client/view to the server/controller? Thanks!

Submitted March 31, 2016 at 04:44PM by dangerzone2

Tiny es6 project boilerplate tool without task runners

http://ift.tt/25yxNSL

Submitted March 31, 2016 at 04:21PM by flyingleo

Logging for Node/Restify with Bunyan + Prettifying output for PM2 ~ The Basement

http://ift.tt/1RMrfIV

Submitted March 31, 2016 at 03:39PM by minispeck

7 no-nonsense tips to master JavaScript

http://ift.tt/1Ti9nYK

Submitted March 31, 2016 at 10:44AM by bencso

How to deal with Restful view presentation on express

I'm working on a project with node.js and express. But I'm confused with the Restful rules.I have a /products resource ."get" operation will return rendered html string that display limited quantity (maybe 50 or 100) products data.The major problem is my other views or other project needs that resource with pure json response , I have to duplicate the database logic to /api/products .Make /api/products with "get" operation responds with json.Am I doing it good? Any more elegant solution can I choose?Thanks for help!

Submitted March 31, 2016 at 09:41AM by silveryiris

Wednesday 30 March 2016

Read in a blog post about changing code real time in Node Apps

"Node.js — and JavaScript in general — is excellent for quick iteration; programs can be inspected and errors can be addressed on the fly without requiring a restart, so developers can publish and deploy new code constantly." from http://ift.tt/1WYZkqo that true? You can edit code and deploy it live without having to stop the service and restart it? Huh?

Submitted March 31, 2016 at 03:46AM by superphly

I think it'd be interesting to learn how to make a highly scalable real-time server with node. Where should I start?

A real-time server, as in one that would be used for something like a video game. I think the concept of how something like Eve Online manages to have tens of thousands of users at once is really cool. I would like to learn the concepts needed to fully understand the architecture and planning that goes into making such a system. I am familiar with Laravel (PHP) and have done quite a bit of work with node as a web application server before, but nothing that needed more than a single instance running on Heroku.For example, check out this diagram that was posted along with this article describing their server structure.What terms or concepts should I be looking for that allows having multiple proxy servers that users can connect to, which then know which master server to connect to, which then communicates to yet another server for database transactions?I know this isn't really node specific, but it seems like a technology people would have experience with it.

Submitted March 31, 2016 at 03:12AM by fluffyanvil

Streaming video-file hosted on Object Store.

Using sessions in a node/passport.js authentication setup?

I'm using passport.js to authenticate users in my ionic/angular frontend node backend app. I am logging people in through Facebook using passport, but then I want to be able to authenticate users with Stripe once they are already logged in.The initial FB log in works fine, but for the Stripe login I was advised to use sessions (can this be done without a session?).My serializeUser function gets called, but when the callback comes back from Stripe in to this functionpassport.use(new StripeStrategy(config.stripe, function(req, accessToken, refreshToken, stripe_properties, done) { DeserializeUser is never called.req.user is undefinedreq.sessionStore.sessions has all the sessions created so farreq.sessionID is a reference to an empty session that I can see in the sessionStore (this ID always seems to stay the same)All I want is to be able to get the id of the user associated with that session, or at least be able to match the session that is coming back with the callback to the correct existing session.Anyone have any ideas where I am going wrong? Or has come across this before?I don't wanna spam a load of code, but I can provide any of what I have done so far. Any help would be greatly appreciated! Thanks

Submitted March 30, 2016 at 09:08PM by monsterChomper

What's with the "cool-##" or "all-packages-##" packages on NPM?

Just had 2 dependents added to one of my NPM packages. Looked through the dependent package and it's just a combination of hundreds of other packages. And there are hundreds of these packages per publishing user.Take a look at this guy's packages. He's got 255 so far, and they all seem to be the same thing.

Submitted March 30, 2016 at 06:40PM by flyingleo

Making files 'generalizable'

I have a variable defined byvar CustomerProducts = require('/Users/MyName/Desktop/JavaScriptFun/CustomerProducts.json')But this file will be downloaded by multiple other users, so for each person who downloads the js and json file, it won't be under '/Users/MyName/' but '/Users/TheirName/', so I can't have my code reference the file by that address in the code.Also later I use fs.writeFile to save a file to the same directory. How could I change all of this?Edit: Also I'm coding this on a Mac, and they're downloading it on Linux. Not sure if that changes anything, but thought I should mention.

Submitted March 30, 2016 at 05:18PM by asdfCode

Tutorial: Implement Access Control in Node.js

http://ift.tt/1RqFKDj

Submitted March 30, 2016 at 04:02PM by karldyyna

How Uber Uses Node.js To Scale Their Business

http://ift.tt/1V54u57

Submitted March 30, 2016 at 03:48PM by Fady-Mak

Sandboxing outbound connections in a node process

With everything that's been going on with npm lately, it got me thinking about what happens if a malicious package made its way into npm. There are a number of DoS-type things a malicious package could do, such as randomly crashing the server or eating up CPU and memory. However, from a security perspective the worst thing a package can do involves collecting data and sending it back to a server somewhere.With that in mind, what's the simplest way of controlling the outbound connections of a Node process? Ideally I'd like to be able to say that this process should only be making connections to myhost.net and anything else should be blocked.I've thought about ways to do it in JS code itself--such as how the nock library completely alters the http behavior. But if it can be done in code then it could surely be undone in code by a malicious package as well. A fool-proof solution would have to be built into Node's underlying net stack itself.I also know there are dozens of way to do this at the OS level, and perhaps that's the correct answer. I'm curious if anyone has other solutions.

Submitted March 30, 2016 at 02:31PM by MrDrego

Scala.js!

http://ift.tt/231cnLK

Submitted March 30, 2016 at 01:39PM by The_Useless_IT_Guy

NLP toolkit using streams.

http://ift.tt/1MSsylc

Submitted March 30, 2016 at 01:12PM by amberlamps1

server closes connection help!

Is Express dead? What do you use instead?

I've seen a few things around recently that hint Express is dead; few commits happening, major contributors have stopped work on it etc.What are your thoughts on this? Is it still wise to use Express? and if not, what are you guys using instead? Most things I look at are at least built on Express.

Submitted March 30, 2016 at 09:03AM by kersh2099

Loading resources in middleware?

My routes are set up something like this:app.get('/blah/:id', middleware.middleware, controller.get);app.post('/blah/:id', middleware.middleware, controller.update);In my middleware, I load in my resource:module.exports.middleware= function(req, res, next){ Resource.findOne({ _id : req.params.id}, function(err, resource){ if (err){ return res.status(500).json(blahblabhblaha); } if (!resource){ return res.status(404).json(blahblabhblaha); } if (authorization condition fails){ return res.status(401).json(blahblabhblaha); } //more condition checking, etc res.locals.resource = resource; return next(); }); }; This is nice for me because I can handle all of the authorization and stuff in one fell swoop. It also cleans up my controllers considerably. The problem is that I can't use mongo's projections this way, because the controllers need different parts of the resource. Is there anyway I can get around this without resorting to having my controllers make database calls?

Submitted March 30, 2016 at 08:12AM by topdeckerino

Tuesday 29 March 2016

Probably really simple question, storing data

Ok, I can't seem to find any help for this.I have one JS file that asks a user on the command line to enter a number.I have another JS file with an array. I need the number the user entered to be stored in that array (in the next entry).For example: The first JS file is run. It asks the user to input a number. The user inputs '5'.In the second JS file, there is an array, lets call it A. Before the user entered the number, A=[4,6,1]. Now A=[4,6,1,5].If we run the first program again, and the user inputs 2, now A = [4,6,1,5,2].Also: If I want to write another program that calls a value of A, how would I do that?

Submitted March 30, 2016 at 02:08AM by asdfCode

Using ES6 with Koa

I would like to use ES6 features other than just generators in my server side application which uses Koa. I use Babel loader with Webpack for my client side application.What's the best way to achieve this?

Submitted March 29, 2016 at 11:09PM by JakeAM1993

What's the best option for storing state in this node.js module? X-post from /r/learnjavascript

Hi,I'm using the q library in node.js. Basically my code calls a series of functions, some synchronous and some asynchronous, passing the result from one function to the next. See my code at the end of this post.My problem is my code only passes the result from one function to the next function that is called. The existing setup only allows for the result of one function to be passed to the next consecutive function in the chain. I'd like to pass the result of say the first function in the chain to the third function called in the chain.What's a good approach to storing the result from calling a function so it can be passed to a function that is called several steps later in the chain, rather than having to pass the result to the next function to be called?Many thanks."use strict"; /*jslint node: true */ let Q = require('q'); let baseFunctions = { parsePage: require('./parsePage'), extractTitles: require('./extractTitles'), walkTheDom: require('./walkTheDom'), getTitles: require('./getTitles') }; let generateFunctions = (config) => { let chosenFunctions = {}; for (let funcName in config.functions) { if (baseFunctions[funcName] !== undefined) { let baseFunc = baseFunctions[funcName]; let args = config.functions[funcName].args && config.functions[funcName].args; chosenFunctions[funcName] = args ? baseFunc.bind(null, args) : baseFunc; } } let funcArr = (Object.keys(chosenFunctions).map(key => chosenFunctions[key])); return funcArr; }; let main = (config) => { let funcArr = generateFunctions(config); let result = funcArr.reduce(Q.when, Q()); result.done(function(end) { console.log(end); }); }; main({ functions: { parsePage: { args: ["http://ift.tt/22ZkQ27"] }, getTitles: { args: 'Multi-Scale Tone Mapping' }, walkTheDom: { args: null } } });

Submitted March 29, 2016 at 11:11PM by nh78

how do you test fast on local machine and other devices?

I'm a back-end newb so I'm trying to test locally a node server I have at localhost on my desktop (its a simple chat app). So if I try to connect from my other devices (tablet or smartphone) they don't connect.So I got some digitalocean cupons and now I started developing on digitalocean and I just figured out deployment. But I currently have to:Push commit from local machine to githubMerge the pull request on githubssh into digital ocean VPSpull origin with changed merged commitre-launch digitalocean VPSHow can I make my workflow better? is there anyway to quickly test locally from different devices?

Submitted March 29, 2016 at 08:42PM by YouShallNot_Parse

Deploy Node.js web app with Enterprise Network Authentication

http://ift.tt/1LXD3cg

Submitted March 29, 2016 at 07:29PM by __KFL__

Changes to npm's unpublish policy

http://ift.tt/1pYxZum

Submitted March 29, 2016 at 06:00PM by steveklabnik1

Production Meteor and Node Using Docker

http://ift.tt/1pHVC9F

Submitted March 29, 2016 at 05:12PM by duvander

Introducing CMND - Easily create a Node.js Command Line Utility using ES6 syntax :)

http://ift.tt/1UZm9eL

Submitted March 29, 2016 at 07:43AM by keithwhor

1000 nodes and beyond: updates to Kubernetes performance and scalability

http://ift.tt/1MNsxix

Submitted March 29, 2016 at 07:47AM by wo1fgang

Monday 28 March 2016

How do I use OAuth with NodeJS and Github API

I failed miserably today by attempting to follow along with this tutorial link and got stuck at Providing a callback since I had no clue how to post the session code in exchange for the access token to github. I tried the modules http, https, request and failed. So I deleted the code and tried using passport-github but nothing worked. I think it requires a database with users set up or something. And I don't want to build a login system but instead simply to output users Github data on a webpage. Also I was doing this on localhost with a self signed certificate if that matters.

Submitted March 29, 2016 at 02:16AM by xDinomode

assert-request: a promise based replacement for supertest to test an HTTP server

http://ift.tt/21PVf9g

Submitted March 28, 2016 at 11:33PM by PlasmaPower

Shaven 1.0 - Powerful DOM building utility and template engine

http://ift.tt/1IDDJix

Submitted March 28, 2016 at 09:58PM by adwolesi

Question about structuring/hosting a small-ish node app

I'm building a web-scraper in node and intend to also build a front-end to display the scraped data once all the node stuff has been taken care of, but I'm feeling a little stuck right now and am not entirely sure how to structure things going forward.The site/app I want to make does two things: 1) fetch images posted by users in a specific thread on a specific website, download them and save info to a db 2) allow users to navigate these images in a pretty little front-endWhat I have right now is a series of functions in node that send a request out to the thread pages sequentially, search for images posted by users, and pass those image URLs along with poster metadata (who posted it, the post permalink, post date) to be downloaded to the filesystem and stored to a database once downloaded. I haven't written anything yet to store the info in a database but that ought to be pretty straightforward.So while it is pretty simple now to just download all the images and save them on my own computer, I don't really know how to translate this into something like a heroku app... I guess one of the main issues is that I would like my server to, say every 24 hours, check to see if any new images have been posted to the thread, and if so download them and add to the database automatically. There are thousands of images so it makes more sense to host them on something like AWS I think, but I'm not really certain how best to approach all this, especially if the server is hosted in one place (heroku), the database in another (mongolab maybe?), and the static files in another (AWS). My current approach would just be to make a heroku app that runs the server (for the front-end) and also starts some sort of timed event that checks for new images and downloads/saves them, passing them along to AWS, if they exist. It seems to me like it would work ok, but I wouldn't be surprised if this is a really terrible solution or not even a viable one.Another concern of mine is making the server keep track of where it left off, scraping-wise. If I start the server and it begins scraping at page 1 of the thread, but something happens and my server needs to restart, how will it know that it left off at page 100? The only thing I could really think of is keeping track of this somewhere in the database (ie with some sort of "last page scraped" variable), but I also don't really feel like that's the best solution.Sorry if these are stupid questions. I have a bit of experience in node but this is definitely a lot more ambitious than anything I've done before. Generally I feel like I could more or less make things work, but wouldn't be confident that my methods would be good ones.

Submitted March 28, 2016 at 09:55PM by Astro_Bass

Global dependencies: they're insecure and they harm your contributors

http://ift.tt/1RB4LKK

Submitted March 28, 2016 at 06:23PM by jkmonger

node / twit question

First of all, if this is not the appropriate place to ask this question I apologize. I've searched for a solution in a few places but haven't found something. I'm a novice programmer so the answer to this might be extremely obvious..I'm trying to write a twitter bot that does two things:records / listens to @everycolorbot's tweets.uses that information to generate and tweet a new image with processing.I've gotten the second part working just fine. But I cannot for the life of me figure out how to get my program to listen / stream a specific users tweets. I'm using the twit node package right now. Any ideas on how I can solve this problem?

Submitted March 28, 2016 at 04:28PM by ang29g

Loosely coupled services and components in Node.js systems

http://ift.tt/1VPSXHE

Submitted March 28, 2016 at 02:29PM by brkattk

Detect external HTTP requests in your test suite with Mocha

http://ift.tt/1RFbuAd

Submitted March 28, 2016 at 01:57PM by Chris911

Getting Started with Form in Node.js

http://ift.tt/1LTx4oL

Submitted March 28, 2016 at 12:06PM by codish9

EverythingStays – Immutable and Distributed Node.js Modules [x-post /r/ipfs]

http://ift.tt/1XXEic7

Submitted March 28, 2016 at 09:59AM by victorbjelkholm

No free clustering with IBM API Connect?

I was about to use Strongloop for restructuring a Node.JS project when I saw that they are integrating Strongloop into IBM API Connect. The official page even points there.However from a brief look at features, I saw that the IBM API gateway in contrast to Strongloop Arc (actually Strong Process manager) does not offer free clustering capabilities when deploying the program as PM did. It is mentioned as a paid feature...I believe this is quite a setback, integrating a good product and limiting its open sourced services...

Submitted March 28, 2016 at 07:59AM by mitsos1os

Need Sequalize help, Testing, Jasmine.

Sooo i think it's best i just paste the code. It is returning an object, which has circular references (can't JSON.stringify easily). This means i cannot expect(result).tEqual(jsonObj) How would i do this??Test Code: var Sequelize = require("sequelize"); var DbConnection = require('./../../core/dbConnection'); var dbCon; describe("A DBConnection Object", function(){ beforeEach(function(){ dbCon = new DbConnection("","",""); }); it("will add a model to the connection",function(){ var model = { name: Sequelize.STRING, type: Sequelize.STRING }; dbCon.add('cheese',model); var result = dbCon.get('cheese'); console.log(result); expect(result).toEqual({ "name": Sequelize.STRING, "type": Sequelize.STRING }); }); });DBConnection:var Sequelize = require('sequelize');var DbConnection = function(databaseName, username, password, host){ //if host is defined, use that, else use localhost var hst = (host)? host: "localhost"; this._connection = new Sequelize(databaseName,username,password,{ dialect: 'mssql', host:hst }); this._state = "not ready"; this._models = {}; }; DbConnection.prototype = { get: function(modelName){ //get a model by the modelName return this._models[modelName]; }, add: function(modelName, model){ var newModel = this._connection.define(modelName,model); this._models[modelName] = newModel; //add a model to the array }, ...

Submitted March 28, 2016 at 08:11AM by ThomasSmWatson

Sunday 27 March 2016

linux-like environment in windows?

so trying to use node in windows was what made me switch to linux in the first place. There were just a lot of GOTCHAs and npm errors that you don't have to worry about in linux.It's 2016, I'm sure there are smart people who have figured out how to work in node in windows with a linux-like environment to solve the issue described. I know of VMs but that seems like a heavy tool for something that should seem simpler.

Submitted March 28, 2016 at 07:13AM by paOol

Identifying users without login - passport question

I'm working on a website that heavily revolves around chat. I built the chat using socket.io and I want to add user authentication.I want anyone to be able to go to the website and use all of the features without having to worry about signing up for an account or logging in. An account will be created anytime a user joins the site and isn't recognized. If they come back later, the site should be able to recognize them and authenticate them automatically. At any point they can choose to claim their account by linking it to a google or facebook account.1: I understand how to authenticate with google/facebook/etc, but is there an easy and secure way to identify someone by storing a cookie and linking it to their account? I assume there is a passport strategy that does this, but looking through them I didn't see any that I understood that did this.2: Once I have user authentication working over http, how do I authenticate users over socket.io websockets? I've tried looking this up but almost all the resources I find are 2+ years old and don't seem relevant.Thanks for taking the time to read my post.

Submitted March 28, 2016 at 06:42AM by Nephyst

how to go back into the command line from a code

So I wrote a code, and once a function is done, I need part of the code to open up terminal, and execute a command through terminal. How would I do this?Edit: I need my javascript program to go back into terminal and execute the command ' cat /Users/User/Documents/address.zpl | nc 10.10.102.100 9100 '

Submitted March 28, 2016 at 01:47AM by going_Grad

Simple proxy for Node micro-services.

http://ift.tt/1Rv3ItK

Submitted March 27, 2016 at 10:52PM by Piercey4

Saturday 26 March 2016

CSRF Protection Question

I'm working on a text based rpg, which includes a terminal style command input. One thing that worries me is that someone will use the API externally to gain an unfair advantage. The page uses ajax to call the api.I guess it kind of works like a chat system that uses an api. So, you wouldn't want people being able to use the API to spam the chat. So, is CSRF right for this situation? and How can I refresh the csrf value everytime a command is submitted, or is that a bad idea?Thanks, Scott

Submitted March 26, 2016 at 09:59PM by scottcfr

How to Convert Uploaded Image to Base64 in Node.js

http://ift.tt/1RtmQui

Submitted March 26, 2016 at 09:51AM by wo1fgang

Tool to check if any of your NPM repository name is trademarked.

http://ift.tt/25pnhgC

Submitted March 26, 2016 at 09:32AM by parro-it

Node.js 5.7 released ahead of impending OpenSSL updates

http://ift.tt/22oiaL7

Submitted March 26, 2016 at 09:21AM by splin69

Friday 25 March 2016

npm Package Hijacking: From the Hijackers Perspective

http://ift.tt/1LOrq7n

Submitted March 26, 2016 at 06:12AM by nj47

Filtering params in Express?

I have an API with params set up. I'm wondering if there is a good tutorial or starting point of how to filter my content (similar to yelp or open table options). I found this lib 'jplist' but its just jquery dom manipulation. I'd rather do something with an actual request.I get the idea of ajax queries, but is that ideal for a situation where I am trying to preserve previous queried params? ex: site.com?day=Monday&location=Something&venue=Club

Submitted March 26, 2016 at 03:52AM by imicit

The Way of the Gopher

http://ift.tt/1ShLQVA

Submitted March 26, 2016 at 03:57AM by horrido

Inference Engine for Node

Infernal Engine 0.15.0 is out! This is an inference engine library developed for Node and usable in a browser. The node package is available athttps://www.npmjs.com/package/infernal-engineThe browser file is available at github:http://ift.tt/1UqfbAW is a good building block for creating an expert system for a product configurator or a browser based video game AI.Your comments are appreciated!thanks

Submitted March 25, 2016 at 08:24PM by formix-se

ORM for NoddeJS, SQL

http://ift.tt/1Nyq9h8 I'm looking at ths currently. Has anyone done this, how and what did you use. Thanks guys!

Submitted March 25, 2016 at 06:54PM by ThomasSmWatson

Noob questions about leftpad. 1) Is it efficient? 2) Would node need to read it for each page? 3) Would node need to re-interpret it for each page?

This is the code for leftpad module.exports = leftpad; function leftpad (str, len, ch) { str = String(str); var i = -1; if (!ch && ch !== 0) ch = ' '; len = len - str.length; while (++i < len) { foo: str = ch + str; } return str; } Is that actually an efficient way to prepend a string with a fixed number of characters?More specifically, how many times in this implementation will "str" be copied into the new string at the step I've labeled foo? Naively it looks like str will be recopied 'len' times. Naively it seems a better implementation would first create then prefix string then append (copy) str to the end of it.Is Node's Javascript engine smart enough to optimize that?If not, are thousands of packages really using this open source implementation that apparently no one thought might be, or should be reasonably optimized? function leftpad (str, len, ch) { str = String(str); var prefix = ''; var i = -1; if (!ch && ch !== 0) ch = ' '; len = len - str.length; while (++i < len) { bar: prefix = prefix + ch; } return prefix + str; } If open source really does work, I have to assume one of:the original code is optimal and I need to learn morethe original code is sufficient and people don't use kik for prepending long stringsJavascript is smart enough to optimize the original codeOr maybe open source doesn't "work".Anyway, here are my real noob question:If IN A BROWSER my code depended on leftpadWould my browser try to download leftpad for each and every page that referenced it?Would my browser have to read, parse, implement the module for each and every page that referenced it?And then in the context of node the same two questions:Would node try to read leftpad for each and every page that referenced it?Would node to read, parse, implement the module for each and every page that referenced it?Does either the browser or node have a context of library functions (or state) that survives a page load?

Submitted March 25, 2016 at 05:58PM by jpflathead

Knexpress - Knex-based object-relational mapping for JavaScript

http://ift.tt/1LMVct0

Submitted March 25, 2016 at 05:11PM by kripod

SchemerJS - A db agnostic JavasScript object modeling and validation library

http://ift.tt/1pAM6oX

Submitted March 25, 2016 at 02:56PM by UberAtlas

What would you do in an internet apocalypse?

http://ift.tt/22zLbHa

Submitted March 25, 2016 at 01:02PM by guybinary

Why I am excited about micro-packages

http://ift.tt/1MpuqqJ

Submitted March 25, 2016 at 01:05PM by srn_pj

Thursday 24 March 2016

I made a module that adds features to native Promises, and that also polyfills promises if they dont exist

I've never published a module before so I would love feedback (code/documentation/feature/any feedback is welcome):http://ift.tt/1UPiQGM basically, I wanted to use native JS Promises, I wanted spread and delay from Q, and I didn't want to special case old browsers / versions of node that don't support promises.So I made this library which polyfills Promises for old versions of JS, and that also sprinkles some useful features similar to Q in: spread, delay, makeNodeResolver, fcall, all(), nbind, ninvoke, nfcall, nfapply, denodify, nbind and npost.I also made a (somewhat controversial I imagine) decision to extend objects with a $promise method that makes it very easy to convert any non-promise returning function into something promise compliant:Fs.$promise('readFile', 'foo.txt').then(function(text){ ... }); (so you can call obj.$promise('methodName, arg0, arg1, ..) on any object and it will wrap it as a promise)So yeah, I would love to get some feedback on this, give it to me straight!

Submitted March 24, 2016 at 11:42PM by Macmee

Recommendations on DB for profile API service?

I'm planning to build an API service in nodejs that stores profile information in a noSQL DB. I've been looking at a bunch of the DB's out there and I'm not sure which DB would be best for the profile service I'm trying to build I'm planning to store the following on a user's profileusernamepassworddashboardwidgetsemailother (metadata stuff) Also, I want to add authentication to the API service and that's something I've never done. I was looking into using https://jwt.io/ to help with authentication. Any recommendations are appreciated. Thanks

Submitted March 24, 2016 at 11:42PM by GladiatorCode

Trying to deploy a chat application to OpenShift have some questions

I'm trying to deploy this chat app, but it seems to not be working.It's the first time I ever do this so I'm a total newb in this. I'm wondering could this be due to:that I ran rhc app create nodechat nodejs-0.10 from inside my chat app but from inside a branch that is not master?maybe because I installed node globally but do I have to reinstall it locally on the root of my dir?Are dirs such as node_modules & bower_components supposed to be ignored in gitignored or actually added to git before doing the rhc app create nodechat nodejs-0.10 command?I didn't have any error message actually I got the msg they show in the tutorial that I'm supposed to get saying that a url for my app was created.Any help appreciated.

Submitted March 24, 2016 at 10:25PM by YouShallNot_Parse

Doclets.io now supporting public GitHub Organization repos. Documentation as a (CI) service.

https://doclets.io

Submitted March 24, 2016 at 10:42AM by gelipp

The npm Blog — kik, left-pad, and npm

http://ift.tt/1LIgzff

Submitted March 24, 2016 at 10:08AM by eymen

FeathersJS, React, Webpack, NeDB

Does someone knows good boilerplate for using FeathersJS, React and NeDB with webpack ?

Submitted March 24, 2016 at 08:32AM by codelearnguy

Blocking and Non-Blocking in Node.js

http://ift.tt/1RmLaOy

Submitted March 24, 2016 at 07:44AM by pspi

Wednesday 23 March 2016

Stellar Module Management – Install Your Node.js Modules Using IPFS

http://ift.tt/22Gr1I5

Submitted March 24, 2016 at 06:44AM by wo1fgang

require-from-twitter

http://ift.tt/1LIuH80

Submitted March 24, 2016 at 06:44AM by tstrimple

The Google App Engine is Now Supporting Node.JS

http://ift.tt/1UaPbJm

Submitted March 24, 2016 at 02:30AM by TwoTimesX

Structuring Express applications with unit testing in mind?

Diving into node at work to build a REST API with express. I've separated the route logic like follows, however I'm having an issue with unit testing because most of my functions are "private" in their controllers:// app.js // -------------------------------------- var userRoutes = require('./routes/users'); app.use('/users', userRoutes); // routes/users.js // -------------------------------------- var express = require('express'); var router = express.Router(); var usersController = require('../controllers/users'); router.get('/', usersController.getAll); // no logic in this file, all logic in controller actions module.exports = router // controllers/users.js // -------------------------------------- module.exports.getAll = (req, res) => { if (someFunction()) { res.sendStatus(200); } else { res.sendStatus(500); } } function someFunction() { // function that I want to test } This seems organized and if fulfills my OCD, but it means that I can't unit test someFunction() because it doesn't get exported.The solution that I was thinking about was to put all "express" centered logic in the routes file and export all the functions in the controller. So the changes would look like:// routes/users.js // -------------------------------------- var express = require('express'); var router = express.Router(); var usersController = require('../controllers/users'); router.get('/', (req, res) => { if (usersController.someFunction()) { res.sendStatus(200); } else { res.sendStatus(500); } }); module.exports = router // controllers/users.js // -------------------------------------- module.exports.someFunction = () => { // function that I want to test } This means that I could import the controller actions and test them directly with mocha, however it doesn't feel as clean to me because now there is logic in the route files.What do you all think? What patterns do you all follow? Very curious to hear :)

Submitted March 24, 2016 at 01:47AM by ProceedsNow

Hard time with MariaDB npm

I want to connect to MariaDB database through NodeJS, but in regards of supporting npms, there's a huge issue.So far, there are only two npms that claim providing MariaDB access in Node, but the first one seems so buggy that I couldn't even run the example code properly, and the other one is unable even to be downloaded properly.Is there anyone who can provide a solution to any of these problems?If these are indeed npm-side problem, is there any other ways to connect to MariaDB in NodeJS?I wouldn't ask if it was not a serious issue, since Google totally left me on my own.

Submitted March 24, 2016 at 01:19AM by KatamoriHUN

Corporate Dissonance - a nice take on the "Kik" controversy

http://ift.tt/1o7ieiJ

Submitted March 23, 2016 at 09:29PM by pizzaiolo_

Building Faster APIs with NodeJs and Redis

http://ift.tt/1nXr6HR

Submitted March 23, 2016 at 08:37PM by NetOperatorWibby

Jade-Resume: The popular resume template by Deedy, can now be written in Jade

http://ift.tt/1RlGTbM

Submitted March 23, 2016 at 07:56PM by bk2dcradle

Converts characters into yellow/gold N'ko, a modern unifier of the Manding languages spoken by mansas throughout medieval North Africa. (npm install goldmansachs)

http://ift.tt/1Rlfadx

Submitted March 23, 2016 at 07:26PM by Emblem21

"KIK" side of the story on the recent issues with NPM and the un-un-publishing of a user package

http://ift.tt/1VFzBVB

Submitted March 23, 2016 at 06:46PM by cynicalreason

Deploying 15 MB Node.js VMs effortlessly to AWS

http://ift.tt/1UkO2PQ

Submitted March 23, 2016 at 04:31PM by axelfontaine

Test Driven RESTful API development using Node and MongoDB

http://ift.tt/25loLZf

Submitted March 23, 2016 at 03:48PM by tmpler

How One Dev Broke Node, and Thousands of Projects In 11 Lines of JavaScript

http://ift.tt/1WIjIfw

Submitted March 23, 2016 at 03:23PM by NotJustClarkKent

NPM Won't Remove Ability to Unpublish Packages

http://ift.tt/1UDZRQB

Submitted March 23, 2016 at 03:00PM by tstrimple

Node v4.4.1 (LTS)

http://ift.tt/25mEmrk

Submitted March 23, 2016 at 02:45PM by gergelyke

Node Hero - Getting Started With Node.js

http://ift.tt/1pHMXVA

Submitted March 23, 2016 at 02:46PM by gergelyke

Death By (Any Of) A Few Thousand NPM Dependencies

http://ift.tt/1UFCk1I

Submitted March 23, 2016 at 12:39PM by meligy

Tuesday 22 March 2016

Node.js on Google App Engine goes beta

http://ift.tt/1S1laWj

Submitted March 23, 2016 at 06:41AM by wo1fgang

How do I write binary bz2 to file?

Hey /r/node, I'm trying to get more familiar with node and have run up against something I'm not familiar with - binary data and file I/O.I'm requesting a compressed game replay file (.dem.bz2) over http and want to write the response to a file. I'm using fs.writeFile(target, new Buffer(source), ...) but not having any luck - the parser (which is current) is throwing not a replay file and I'm not really sure why.I have a few more details over here.What am I missing?

Submitted March 23, 2016 at 02:02AM by Jefftopia

Node Project: Wrap a website so you can have it as a quick shortcut in the dock on Osx.

http://ift.tt/1q0QVZ1

Submitted March 23, 2016 at 12:00AM by Robert_Gabriel

left-pad package unpublished from npm, breaks builds

http://ift.tt/1Sgnv2k

Submitted March 22, 2016 at 10:12PM by fens808

Node JS N00b Questions

It's been about 10 years since I built my first website, I believe I was using frontpage at the time (el oh el) I moved to Dreamweaver soon after. The last site I actually completely built in Dreamweaver was ~5 years ago. I have since moved to doing more on the server side of things but I am still very active with HTML as well.About a year ago I discovered node JS but I had problems getting it to work. In the last week I have been trying to get it to work to do literally anything. I just want to know what node JS does and are people using it to build production sites? What are the benefits of using it?What I know about node js: -Node JS is a Javascript runtime. -NPM seems to be a package manager of sorts. -There are some cool packages I want to check out such as grunt uncss.Questions I have: What is an SCSS file? How does it work? What is a package.json file? Is this similar to the way a JSON api works? Who uses node js? Is there a really good beginners guide to installing on windows?I feel like windows may be my problem. I spent a whole day searching NPM errors one after another and most were odd dependencies like python. I'm not familiar with python on a windows box at all but I am on a linux box. Does node run better in a linux environment or maybe a dedicated windows environment.Also I want to get into angular js, and it looks like node is a requirement?This CLI based web development where you "build" rather than "code" is new to me, any help, information, or pointers would be greatly appreciated.TLDR: - What is node js? - Who uses node js? - Pros? Cons? - Bomb ass n00b guide anywhere? Also a n00b guide for angular?

Submitted March 22, 2016 at 08:33PM by coppazappa

Using Request Module

What's the best way to publish private NPM ES6 packages?

What's the best way to publish NPM packages written in ES6? The easiest way would be to publish as ES5 but some of our NPM packages will be used for client-side code so adding transpiler bloat is not ideal.Also we would still be using paths inside the modules, regardless if we would be using it from Node or Webpack, such asrequire('@scope/my-module/internal/file.js') I had some ideas such as, using ES6 as the "default" exposed scripts, but would monkey-path Node's requirefunction to append /es5 to the path so that the ES5 files can be used.Any ideas?

Submitted March 22, 2016 at 07:52PM by dscer

BuiltWithMeteor Weekly # March20th2016

http://ift.tt/1PpwKbZ

Submitted March 22, 2016 at 06:41PM by bogdancloud

Getting started with Node, Express, Bootstrap

I've started reading up on Node and Express with the intention of porting a few projects of mine over to it. The projects I'm porting are currently built with Python and Flask, and styled with Bootstrap.I'm having difficulties getting a basic Express site up and running with Bootstrap as the styling. I used express-generator to get the basic skeleton set up, and then used npm to install bootstrap:npm install bootstrap I added bootstrap as a requirement, and as a middleware:var bootstrap = require('bootstrap'); app.use('bootstrap'); Now I'm just not sure how to "import" that into my layout template. If someone could show me an example, or point me to a resource, that'd be great.

Submitted March 22, 2016 at 05:17PM by knolll

How to create REST API without using any framework?

I am banging my head from past few days to learn nodejs by myself. I want to create a simple JSON API by using the "http" service in Nodejs. I am not getting much information on google as everywhere they are showing it with frameworks like express n all. Currently, I don't want to use any framework to understand Nodejs. Can somebody guide me.Thanks!

Submitted March 22, 2016 at 04:38PM by love_humanity

Nodejs madness?

http://ift.tt/1MktCDs

Submitted March 22, 2016 at 12:42PM by The_Useless_IT_Guy

Real time Visualization of your server's resource usage with Node, Socket.io and D3.js

http://ift.tt/1pXbA07

Submitted March 22, 2016 at 07:22AM by CaptainDevops

#NodeJS : A quick optimization advice

http://ift.tt/1SeDKNn

Submitted March 22, 2016 at 06:42AM by shsh2

Monday 21 March 2016

Private module import (via git clone) messes npm install thereafter with npm 3

when I am trying to install an npm module after having a private module cloned inside my node_modules directory. npm gives this errorFor example here, I am trying to install ejs in my node project in which I already have a private module.root@27b6056fe5ff:/tes# npm install ejs --savenpm ERR! Linux 4.1.13-boot2dockernpm ERR! argv "/usr/bin/nodejs" "/usr/bin/npm" "install" "ejs" "--save"npm ERR! node v5.9.0npm ERR! npm v3.7.3npm ERR! path /tes/node_modules/myprivatemodulenpm ERR! code EISGITnpm ERR! git /test/node_modules/myprivatemodule: Appears to be a git repo or submodule.npm ERR! git /test/node_modules/myprivatemodulenpm ERR! git Refusing to remove it. Update manually,npm ERR! git or move it out of the way first.npm ERR! Please include the following file with any support request:npm ERR! /tes/npm-debug.logwhere as this installation works fine with npm 2.Did anyone face this similar issue?

Submitted March 22, 2016 at 05:57AM by ratancs

using multer to grab the req.file to modify it before saving to the destination.

hello. I am using multer for my multipart/form-dataI want to read the file before its saved to the server. Any files that can be worked on locally before saved to the server is best. Multer has a memory option, but I dont know much about that yet. Still digging.I am using sox and according to the documentation this is the types of input it allowsFilenames can be simple file names, absolute or relative path names, or URLs (input files only). Note that URL support requires that wget(1) is available.so my question is, how can do this better than uploading the file and then just grabbing the file from the destination path and then doing the changes. that seems like a lot of unnecessary overhead than just using the original file from the form and then saving the modified copy to the destination.thanks for any feedback.

Submitted March 22, 2016 at 05:14AM by clandest

Node.js on Google App Engine goes beta

http://ift.tt/1SdxIfO

Submitted March 21, 2016 at 07:40PM by justinblat

Lisk, The first Javascript based decentralized application platform Raised 5.7M USD

Yesterday, the Javascript based decentralized application (Dapp) platform, Lisk, made history by earning the 15th spot on the most successful crowd funded project to date. An, astounding, estimated amount of $5,750,000 USD was raised within a (1) month time-frame to support the development and future of Lisk's ambitious mission to create a world full of decentralized Javascript applications.    Big and important players have already began to show immense interest in Lisk and its mission overall, one of the most notable player includes Microsoft Azure, which officially announced the partnership that was made between Microsoft and Lisk. The official announcement can be found here If are interested in learning more about Lisk follow these links listed:WebsiteBlogForumRedditChat  Lisk will be launching its official mainnet near the 2nd week of April but allows for enthusiast's and developers to get familiar with its platform by using its testnet, which you can find information about on Lisk's Website or Lisk's Reddit page. Lisk may also be in the process of scouting new developers to expand and grow their development team, which in the upcoming days you may be able to find more details about this.

Submitted March 21, 2016 at 06:59PM by ThisTookAWhile

Angular + node + express base/seed project repo?

I'm searching for a base project example ideally a repo from which I can start an app with angular + express (no jade, no ejs, nothing extra) just angular, node & express.Links greatly appeciatedI'm talking something like this (but as a node newb I'm not sure if this is up to date last commit was 2 years ago): http://ift.tt/1m1zxOZ

Submitted March 21, 2016 at 06:23PM by nomadProgrammer

I'm creating a multiplayer card game for learning purposes, and am confused about how to organise game data server-side and in the database. Any advice would be appreciated!

Hey guys! I've created a chat application before, and now want to get into something a bit more complicated. So I decided to re-create the board game Dominion. I'm using Express, MongoDB with Mongoose, and Socket.io, just as I did with the chat app before.Now, I'm confused about how to store card-related information in the database. A game basically has 17 reserve stacks of cards, a discard pile, plus a stack, a hand and a discard pile for each player (2-4 players per game).A few things I'm aware of:Card stacks, hands and discard piles can probably be handled with the same model, so I'll only refer to card stacks from now on.Reserve card stacks only contain one type of card, so I just need to save how many cards are left, and create a card when it is drawn from the stack.So, I see several ways of saving a game's stacks and cards in the database (or without it), and am confused about what technique would be better:1. Everything in the database I could create a mongoose model for card stacks and one for cards. Then each stack would be something like:MongooseModel CardStack:{ cards:array of ids } MongooseModel CardCellar:{ //cellar is the name of one of the cards in the game id:some_id, cost:2, ... } This means a lot of objects in the database! Late game, you can easily have dozens of cards in each of the players' hands, so it would be dozens to hundreds of objects per game. Seems like a lot? This also means lot's of models for the different card types.2. Less models Same as above, but using only one model for all card types:MongooseModel Card:{ id:some_id, name:'Cellar', cost:2, ... } In this case I would have only one collection for all cards in any game. Is that better?3. Use the database much less Since Dominion has only like 28 card types total, I could create a mongoose model for card stacks, and store card types in a js/json object that is not in the db. The idea being, that all card objects of one type in the database are exact duplicates. Seems unnecessary.MongooseModel CardStack:{ cards:array of ids } Object cardTypes:{ cellar:{ cost:2, ... } } This means a lot less objects in the database, but means I'll need to load a js/json file from the file system every time I want to access cards. Is this a bad thing? Actually, I probably could load it just once globally in the file with my socket.io game logic...That's my thoughts so far. Any advice would be appreciated :)

Submitted March 21, 2016 at 03:42PM by DJLaMeche

Stripe Payments Kit with NodeJS, AngularJS and Ionic

http://ift.tt/1JgGZTU

Submitted March 21, 2016 at 11:59AM by noodlio

Realtime JS microservices with deepstream.io

http://ift.tt/1VugkGK

Submitted March 21, 2016 at 11:26AM by wolframhempel

The current state of dependency inversion in JavaScript

http://ift.tt/1S022b6

Submitted March 21, 2016 at 11:00AM by ower89

Creating a Simple Web App with Node.js

http://ift.tt/1XGNmC1

Submitted March 21, 2016 at 10:29AM by codingneon

The Unbelievable History of the Express JavaScript Framework

http://ift.tt/1pWdLB1

Submitted March 21, 2016 at 09:40AM by the_king13

Sunday 20 March 2016

A graphical activity monitor for the command line. Written in Node.js

http://ift.tt/1qm8vRQ

Submitted March 21, 2016 at 05:52AM by wo1fgang

Need help understanding Node streams and crazy memory usage

Hello /r/node! I have a very simple example here which opens a file read stream and a file write stream, and simply pipes one to the other:var fs = require('fs'); console.log("BEFORE: ", process.memoryUsage()); var inp = fs.createReadStream( '/var/tmp/30mb.log' ); var outp = fs.createWriteStream( '/var/tmp/joe.txt' ); outp.on('finish', function() { console.log("AFTER: ", process.memoryUsage()); } ); inp.pipe( outp ); The file being read is 30 MB, but I wouldn't expect any large memory increase, because I'm using streams and pipes. It should read/write in 16K chunks or something, right? But in every version of Node I've tested, this effectively loads the entire file into memory:Node v0.12:BEFORE: { rss: 18169856, heapTotal: 9751808, heapUsed: 3934048 } AFTER: { rss: 52125696, heapTotal: 11803648, heapUsed: 4326008 } Node v4.2:BEFORE: { rss: 19476480, heapTotal: 7408736, heapUsed: 3623808 } AFTER: { rss: 39321600, heapTotal: 9472608, heapUsed: 4832224 } Node v5.8:BEFORE: { rss: 15433728, heapTotal: 7523616, heapUsed: 4076352 } AFTER: { rss: 46604288, heapTotal: 10619424, heapUsed: 6069584 } Can anyone explain why this is happening, and/or how I can copy a file without having Node's memory explode in size?

Submitted March 21, 2016 at 02:12AM by cgijoe_jhuckaby

Very nice tutorial for building an app with sails.js

https://www.youtube.com/playlist?list=PLF8BRFFRWv9VkafkA4JtgY0I5NIzX2ZI9

Submitted March 20, 2016 at 09:54PM by dangerzone2

Isomorphic Angular 1.5 in Node

Hey EveryoneI've been working on a way run Angular services in node. The library is very focused (read - limited) to just working with services/providers/factories that have no browser/UI dependencies. I've rewritten some of the dependency injection / resolution. All code is evaluated via the built-in vm moduleHas anyone encountered something like this in 'the wild' ?History: I initially started with the angularcontext module but found that lacking.Uses: Running a portion of an angular app in node. code reuse and 'headless' access.

Submitted March 20, 2016 at 06:31PM by sql_big_result

AdonisJs - Best ever NodeJs framework

Adonis Js seems to be one of the nicest framework in Node community. It is still young, but i can see the base of the framework has been laid out so nicely.Things like IoC container, Dependency injection and Active Record based ORM are all the things required for writing maintainable applications.Hoping the framework should grow and stick around.

Submitted March 20, 2016 at 06:25PM by andycharles

Saturday 19 March 2016

Koa.js: A happy path to async/await

http://ift.tt/1PjJJMg

Submitted March 20, 2016 at 02:22AM by cmgriffing

Reconsider - a Database Migration Tool for RethinkDB

Hi everyone,I just published a small sideproject of mine - it's called Reconsider, and the purpose of the tool is to make programmatic database migrations in node apps using RethinkDB easier.I'd welcome any sort of feedback: http://ift.tt/1pTIXAU: I originally intended to xpost this to /r/rethinkdb, but reddit's spam protection prevents me from doing so at the moment - therefore the xpost will have to wait until morning, I need sleep now.

Submitted March 19, 2016 at 11:59PM by Daerion

Is it possible to use node.js as a proxy such that I can edit incoming and outgoing response/request objects?

Per the title. Wondering how tough this is

Submitted March 19, 2016 at 10:38PM by -proof

Contextual binding support in InversifyJS (IoC container for JS apps)

http://ift.tt/1RtMiwD

Submitted March 19, 2016 at 10:41PM by ower89

Unable to generate URL to send to user for requesting access to a particular non-public google sheet

koa vs. Hapi+co vs. Hapi+async/await

At the moment, I've been working on a project where I use Hapi. Most API calls are handled with promises, but some of them require a bit more work and instead of using .then four times, I prefer to use co to add a generator function as the handler, so I can use yield everytime to perform all operations.Now it isn't exactly clear to me how co differs from using async/await, is it just that async/await is a native function of ES7, or is there a functional difference?And if I use Hapi this way, what advantages does koa have, aside from being a bit more easy to read? I understood that koa uses co to treat every route as a generator function, but does this result in a functional difference from using any other web framework with co? (aside from looking a bit cleaner)

Submitted March 19, 2016 at 05:08PM by itsYourDeveloper

Beginner question: How do you use handlebar instead of Jade?

Sorry if this is a total newb question, but I'm pretty new to this and don't exactly know how do this. Any help would be appreciated!

Submitted March 19, 2016 at 03:48PM by snahrvar

/r/node hits 20K subscribers

http://ift.tt/1wA280c

Submitted March 19, 2016 at 03:49PM by TrendingBot

Request + telegram bot, how to combine?

Hi, I'm decided to use a telegram bot that parse your arguments and get info from the web.I have made a basic app that scrapes the info and log in into console using request + cheer.ioThen I made a simple telegram bot that handles the arguments and it's supossed to call the function that does the request.But request does call a callback that handles just 3 arguments error, response, body. And there are the data I want to send into the message.Is there any way of get the data from that callback and send the message?(I'm using yago's telegram-bot by the way) http://ift.tt/1VnkUGs any case, thank you so much for your time

Submitted March 19, 2016 at 03:22PM by Kotenoru

Increase your dependencies

http://ift.tt/1pSCMx2

Submitted March 19, 2016 at 02:15PM by drinchev

How we use logs in production

http://ift.tt/1pAdXpP

Submitted March 19, 2016 at 10:23AM by olivervscreeper

Creating interactive charts using Node.js, ExpressJS and MongoDB

http://ift.tt/1WxJByA

Submitted March 19, 2016 at 09:54AM by InLoveWithTerminal

Friday 18 March 2016

Easy error handling in Node.js

http://ift.tt/1pS05ad

Submitted March 19, 2016 at 04:35AM by wo1fgang

Self-taught mid-level PHP developer here migrating to Node. Any pro tips to smooth/speed up the process?

Hello guys. Although I really like PHP, it's starting to get usual for me to need apps running constantly, websockets and a persistence layer. That's why I'm migrating.If you guys can help me with tips it would be great! Thanks.

Submitted March 19, 2016 at 03:49AM by tabarra

How to navigate through directories in Nodejs

http://ift.tt/1ry04Fz

Submitted March 19, 2016 at 02:42AM by shsh2

Free and premium resources for NodeJS

http://ift.tt/1S97hIb

Submitted March 19, 2016 at 01:23AM by noodlio

Google-drive api (NodeJS) Error: Request had insufficient authentication scopes

Hello!I am trying to generate a URL to send to users so I may access a particular sheet(if they accept the request). To that end, I was using the tutorial at Google Drive REST API here, and I was able to successfully call authorize(JSON.parse(content), listFiles); to get a list of files in a user's drive. Now, what I actually want is to read the contents of a particular spreedsheet, so I looked around and found this here :function callAppsScript(auth) { var scriptId = 'ENTER_YOUR_SCRIPT_ID_HERE'; var script = google.script('v1'); // Make the API request. The request object is included here as 'resource'. script.scripts.run({ auth: auth, resource: { function: 'getFoldersUnderRoot' }, scriptId: scriptId }, function(err, resp) { if (err) { // The API encountered a problem before the script started executing. console.log('The API returned an error: ' + err); return; } if (resp.error) { // The API executed, but the script returned an error. // Extract the first (and only) set of error details. The values of this // object are the script's 'errorMessage' and 'errorType', and an array // of stack trace elements. var error = resp.error.details[0]; console.log('Script error message: ' + error.errorMessage); console.log('Script error stacktrace:'); if (error.scriptStackTraceElements) { // There may not be a stacktrace if the script didn't start executing. for (var i = 0; i < error.scriptStackTraceElements.length; i++) { var trace = error.scriptStackTraceElements[i]; console.log('\t%s: %s', trace.function, trace.lineNumber); } } } else { // The structure of the result will depend upon what the Apps Script // function returns. Here, the function returns an Apps Script Object // with String keys and values, and so the result is treated as a // Node.js object (folderSet). var folderSet = resp.response.result; if (Object.keys(folderSet).length == 0) { console.log('No folders returned!'); } else { console.log('Folders under your root folder:'); Object.keys(folderSet).forEach(function(id){ console.log('\t%s (%s)', folderSet[id], id); }); } } }); } I pasted this code in my quickstart.js file, but now, when I called authorize(JSON.parse(content), callAppsScript);, I got the following error:The API returned an error: Error: Request had insufficient authentication scopes Here is the complete code :var fs = require('fs'); var readline = require('readline'); var google = require('googleapis'); var googleAuth = require('google-auth-library'); var SCOPES = ['http://ift.tt/JALASw','http://ift.tt/1mEd3VM','http://ift.tt/AjNHPk','http://ift.tt/1isPOKm','http://ift.tt/1cMkUd0']; var TOKEN_DIR = (process.env.HOME || process.env.HOMEPATH || process.env.USERPROFILE) + '/.credentials/'; var TOKEN_PATH = TOKEN_DIR + 'drive-nodejs-quickstart.json'; fs.readFile('./client_secret.json', function processClientSecrets(err, content) { if (err) { console.log('Error loading client secret file: ' + err); return; } authorize(JSON.parse(content), callAppsScript); }); function authorize(credentials, callback) { var clientSecret = credentials.installed.client_secret; var clientId = credentials.installed.client_id; var redirectUrl = credentials.installed.redirect_uris[0]; var auth = new googleAuth(); var oauth2Client = new auth.OAuth2(clientId, clientSecret, redirectUrl); // Check if we have previously stored a token. fs.readFile(TOKEN_PATH, function(err, token) { if (err) { getNewToken(oauth2Client, callback); } else { oauth2Client.credentials = JSON.parse(token); callback(oauth2Client); } }); } function getNewToken(oauth2Client, callback) { var authUrl = oauth2Client.generateAuthUrl({ access_type: 'offline', scope: SCOPES }); console.log('Authorize this app by visiting this url: ', authUrl); var rl = readline.createInterface({ input: process.stdin, output: process.stdout }); rl.question('Enter the code from that page here: ', function(code) { rl.close(); oauth2Client.getToken(code, function(err, token) { if (err) { console.log('Error while trying to retrieve access token', err); return; } oauth2Client.credentials = token; storeToken(token); callback(oauth2Client); }); }); } function storeToken(token) { try { fs.mkdirSync(TOKEN_DIR); } catch (err) { if (err.code != 'EEXIST') { throw err; } } fs.writeFile(TOKEN_PATH, JSON.stringify(token)); console.log('Token stored to ' + TOKEN_PATH); } function listFiles(auth) { var service = google.drive('v3'); service.files.list({ auth: auth, pageSize: 10, fields: "nextPageToken, files(id, name)" }, function(err, response) { if (err) { console.log('The API returned an error: ' + err); return; } var files = response.files; if (files.length == 0) { console.log('No files found.'); } else { console.log('Files:'); for (var i = 0; i < files.length; i++) { var file = files[i]; console.log('%s (%s)', file.name, file.id); } } }); } function callAppsScript(auth) { //same as above }else { var folderSet = resp.response.result; if (Object.keys(folderSet).length == 0) { console.log('No folders returned!'); } else { console.log('Folders under your root folder:'); Object.keys(folderSet).forEach(function(id){ console.log('\t%s (%s)', folderSet[id], id); }); } } }); }

Submitted March 18, 2016 at 11:17PM by CreaTuRe_X

MEAN stack tutorial for beginners 2 - Sending static html files

https://youtu.be/wCFGPSLrNP0

Submitted March 18, 2016 at 09:36PM by ThomasSmWatson

How do I build an email invitation sign up system similar to Slack?

I am using Express to build the backend for an Angular app. I want the sign up system to be invite only. So an admin user would add the email of a member. The member should receive an email with the link and when she clicks it it would open the app and she only has to fill in her name and password to complete the regisrstion. Any idea how?I have learned to use token based auth with jwt and sending email with nodemailers, but i have no idea how to start with something I described above and make sure the process is secured.Really appreciate it if someone could point me to the right direction!

Submitted March 18, 2016 at 08:14PM by GE7H

javascript - "TypeError: req.flash is not a function" using passport with nodejs, username and password auth .. any ideas?

http://ift.tt/1R4oz97

Submitted March 18, 2016 at 02:49PM by bobbyrne01

Is Node.js overrated?

http://ift.tt/258aDlR

Submitted March 18, 2016 at 11:07AM by wo1fgang

bookshelf-transaction-manager

Have you ever used the module bookshelf-transaction-manager ? It looks interesting to me but it's not popular in the community. So I'd like to know if you see or encountered any drawback in its use.

Submitted March 18, 2016 at 10:41AM by davebaol

Introducing Feathers 2.0 - A minimalist real-time framework for tomorrow’s apps

http://ift.tt/1R2FlXx

Submitted March 18, 2016 at 10:42AM by Kevitus

Play space invaders whilst running npm install

http://ift.tt/1VglQwu

Submitted March 18, 2016 at 10:37AM by ShermheadRyder

EnterpriseJS Seattle #001 coverage

http://ift.tt/1py2aZ4

Submitted March 18, 2016 at 10:21AM by eljefederodeodeljefe

Thursday 17 March 2016

Designing a RESTful API with Node and Postgres

http://ift.tt/1QYAIfZ

Submitted March 17, 2016 at 11:19PM by piterpolk

Announcing Marko v3: From HTML to HTML-JS

http://ift.tt/1RpnPsd

Submitted March 17, 2016 at 09:00PM by psteeleidem

MarkoJS Releases v3.0, a huge milestone with a new parser and concise syntax option

http://ift.tt/1S6GYm4

Submitted March 17, 2016 at 08:27PM by seangates

Ask: What are your favorite node talks?

Asking for favorite talks related to Node online.

Submitted March 17, 2016 at 07:04PM by Federalist85

Help with vscode and intellisense

I can't figure out how to make intellisense to work with any modules except for https and express modules. I followed the steps in vscode official site using typings, when I try to get intellisense to routes it doesn't return anything.Anything would be appreciated I've been trying for six hours.

Submitted March 17, 2016 at 06:18PM by CuForCucamber

What to use Laravel/Lumen or Nodejs for a Rest API for a music service similiar to spotify/app music?

Hi guys, I am planning a music service and my constraints areScalability Performance (Expects lots of traffics on web and mobile app) Complexity (New developers must be able to jump in and feel at home)

Submitted March 17, 2016 at 04:32PM by adetoola

Super black women want s...x with super men. Go and find out hFpq5VSMA

http://ift.tt/1nR4N6F

Submitted March 17, 2016 at 02:29PM by i43bf67qp92g

Load-testing with Node.js and AWS Lambda

http://ift.tt/1QoA5bT

Submitted March 17, 2016 at 01:54PM by hyperspeed

For an app like EasyTaxi or Uber. Websockets and node are perfect for the back-end right? How would one make the architecture for such app?

This is more or less what I think the architecture could look like:http://ift.tt/1Xxuoxx of my questions:I'm not sure if there should be a database for recording current location of drivers and users.I'm sure there should be a database at least to register account of drivers.I think a SQL database is ok for this since my entities won't be changing, the ones I can think of are address, user, driver, location. It's to my understanding that NoSQL has advantages when entities might be very different yet I want to put them on same collection/table.What is the technical concept of an API but for websockets?Is websockets & node good for this job?

Submitted March 17, 2016 at 12:32PM by heroOfTimeBitch

Help! npm failing (gyp error and install script error) during npm install homebridge on debian

Node.js 5.7 released ahead of impending OpenSSL updates

http://ift.tt/22oiaL7

Submitted March 17, 2016 at 08:45AM by Notthsamen

How to check if Node.js supports ES 6 language feature

http://ift.tt/255EETv

Submitted March 17, 2016 at 07:00AM by pspi

Wednesday 16 March 2016

which templating library is good for rendering email templates?

I am looking atJavaScript Template Engines(NAME : GITGUB STARS) Jade : 7,335 Mustache.js : 6,985 Dust.js : 1,571 Nunjucks : 1,565 EJS : 1,796Requirement is: it should be light. email templates do not need many partials to combine so can avoid this feature, a simple variable replacement will do. template loading should be done once and rendering can be done many times ( promises? ) for promotional emails.

Submitted March 17, 2016 at 06:19AM by ratancs

Node.js Buffer API Changes

http://ift.tt/21vj71Y

Submitted March 17, 2016 at 05:45AM by wo1fgang

Implementing an effective view/hit counter with node.

Firstly I am using the express framework to handle the back end. I've been in a bit of a stretch lately trying to come up with a scheme for a view counter that doesn't bloat the DB (using MongoDB).Ideally, what I would like is to have a day by day view counter of a certain sub domain. Think of say the individual github project pages with view counters. A view here counts as a first-time, unique page visit from an IP. Recurring visits will not increment the view counter.My non-ideal approach was to create a new collection say 'views' and the individual documents within views would have the following schema.{ "name" : String, "views" : [ { "day" : Date, "count" : Number, } ], "ips" : [String] } This is a sort of appropriate schema since I would like an easy way to check whether the IP has already requested this page, and I could log the views on a per day basis, but it just seems that in the long run traversing through the "views" array to obtain a particular day would become slower and slower. And not to mention the IP array, say if you were to accumulate 1 M views string comparison per visit would take a devastating toll on performance. Also remember this will be done on a per subdomain/entry basis which at this point it was best to reconsider my approach.So I come to you guys, any suggestions from prior experience are appreciated or better yet if you know of a module written to do this at a production scale that would be a gift, thanks.

Submitted March 17, 2016 at 03:10AM by markt5000

How to deploy Node?

Kinda new to node.I have made a little node site and have it running on localhost, now how do I get it running 24/7? How do I deploy a Node program and what are my best options. Free is always best :). I have plenty of desktop computers at my disposal as well.

Submitted March 17, 2016 at 02:51AM by Xornial

Improving my current Koa/Sequelize/Handlebars stack

Hey guys,I found myself writing the same code for several projects over the past year I've been using Node.js. I've started using Koa lately so I decided to create a template as a base for my future projects. I was wondering if anyone could check it out for any obvious potential flaws in my design before I carry on using it? To avoid kicking myself in the ass another year down the line!http://ift.tt/22lC8tc thanks for your time. Not expecting a major analysis or anything just anything obviously wrong.

Submitted March 16, 2016 at 11:27PM by Ashhhh

spotify api get token???

I have been struggling with spotify's api for the last couple of days and am going insane. I created an app via spotify and have my credentials (clientid/clientsecret/somelocalcallbackURI). Now regardless of how I go about it I can not ever seem to get a working call to create a playlist (or anything requiring user auth). I have tried raw header,body,auth requests in python and node and nothing seems to work. I would just like the LITERAL code of how to get the token and let it work.[yes I have tried every example in their web api examples], as well as most of the relevant ones in the node-js wrapper. any ideas? :((I have tried:// The code that's returned as a query parameter to the redirect URI, HOW????? var code = 'MQCbtKe23z7YzzS44KzZzZgjQa621hgSzHN'; // Retrieve an access token and a refresh token spotifyApi.authorizationCodeGrant(code) spotifyApi.getMe(); //says it returns auth user? // Create the authorization URL, scope = playlist-modify-private playlist-modify-public, wtf should state be?? var authorizeURL = spotifyApi.createAuthorizeURL(scopes, state); spotifyApi.createPlaylist('maximus12793', 'My Cool Playlist', { 'public' : false }); However I am not sure where the code is (could someone post the literal code of how to retrieve it?)refs: * http://ift.tt/17oGeGd * http://ift.tt/1tCL9fB

Submitted March 16, 2016 at 10:14PM by maximus12793

BuiltWithMeteor Weekly # March13th2016

http://ift.tt/1STDhCq

Submitted March 16, 2016 at 09:01PM by bogdancloud

Killing the Monolith | @RisingStack

http://ift.tt/1QXxXLM

Submitted March 16, 2016 at 06:08PM by aswiniatibudhi

[koajs] this.query object is empty

Here's another noobish Node/Koa question of mine. I have the following function and this.query seems to be an empty object, no matter how I post:router.post('/', function *() { if (!this.query.location) { this.status = 400; } else { let res = yield weather.get(this.query.location, config.API_KEY); this.body = yield { temperature: { current: res.main.temp, minimum: res.main.temp_min, maximum: res.main.temp_max }, description: res.weather[0].description, humidity: res.main.humidity, visibility: res.visibility, pressure: res.main.pressure, wind: { speed: res.wind.speed, direction: res.wind.deg }, clouds: res.clouds.all, name: res.name }; } }); I've verified that I'm posting correctly (just to make sure, I tried curl --data "location=Stockholm" http://localhost:4000 as well) but the query object remains empty. Any ideas?[here's the complete app.js code]

Submitted March 16, 2016 at 03:09PM by kbrgl

Kind of in a desperate situation: Is node suitable for freelance?

So due to my wife receiving a very good job offer we moved to a small country: Panama. Which has a stagnant software industry. i.e: you can see job offers asking for someone with 5-10 years experience paying $2000 (USD). People with 2-4 years payment $900. and its common to see offers asking for old tech stacks such as visual basic, struts and fox pro.I have 1 year android and front-end (angular, js, html, css, jquery, bootstrap) experience. So I began thinking that maybe freelancing is a vailable option so I started learning node.js just completed my first nodejs "hello-world-crud-app" yesterday and now started searching about how to get my first freelance client.It seems everyone is using wordpress + php, and that support of maintenance of websites is given through the hosting company (not the developer), but with node.js I would use a VPS server and thus I would have to provide the support directly(?). This is unrealistic because I can't give support 24/7 to potential clients.So I want to know if anyone here has a career as a freelancer using node for the backend. Would really appreciate guidance and to know if it is possible

Submitted March 16, 2016 at 02:45PM by YouShallNot_Parse

Show r/node: Node by Example - Exercises and tutorials on real world examples in Node.js

http://ift.tt/1Z00yDe

Submitted March 16, 2016 at 01:25PM by joshmanders

How many node_modules directories do you have? (Horror game)

Run the following command on your project - tree -d | grep -c node_modulesMy score is 322

Submitted March 16, 2016 at 12:32PM by tsirolnik

Check JSON file for updates.

I am wanting to check this JSON file Twitch outputs every time someone goes live. Though I am very unware of how I'd do it, because I'm still new to Node and JavaScript as a whole.As you can see here, it outputs a lot more to the JSON file is online.So how can I:Check the JSON file for user online status. But when user is online, check for offline status.

Submitted March 16, 2016 at 10:41AM by ErraticFox

Does it make sense to write an app using Babel?

Hi. I'm somewhat inexperienced when it comes to node, and I've spent the last few months (off and on) building an app with it.I've recently started looking into JavaScript supersets - in particular Babel and TypeScript. The reason being that I want to take full advantage of all the helpful features, keywords, etc. that these supersets (transpilers?) have to offer.After much deliberation, I've decided to pursue Babel. The main reason for this is because it seems to be on the forefront of ECMAScript development.Now correct me if I'm wrong: Babel can be used for server-side (i.e. node.js) development, right? If that's the case, why do I get the impression that Babel is not really that often used for server-side development? I've tried searching phrases such as 'babel nodejs', 'babel expressjs nodejs', and I'll often get a dearth of results and little to no pointers, guides, or tutorials for getting started.Is there something I'm missing here? This is my first delve into 'modern/hip(ster)' (so to speak) technologies, and I just want to make sure I'm not misunderstanding the role Babel (and other similar JS supersets) plays.Thanks for reading!

Submitted March 16, 2016 at 08:57AM by careerzthrowawayz

Tuesday 15 March 2016

Need help getting a handle on handlebars

Node newb here.I'm building an app with node + express + handlebars and I'm having trouble rendering the handlebars template client-side with the data.Below I've included a link to a setup that uses handlebars in both an html and node version. The HTML version works, but the Node version does not. Any ideas why the data isn't being rendered in the Node version?HTML: http://ift.tt/1PbdXRy: http://ift.tt/1TN8yb9

Submitted March 16, 2016 at 06:19AM by learnUtheweb4muchwin

[koajs] difficulty with asynchronous callbacks and yield

I've been working on a weather app in Node and being the Node noob that I am, I'm having some difficulty using callbacks in conjunction with yield. I've omitted a lot of other code because I don't think it's very relevant to my problem:router.get(function *(next) { let res; // current temperature (degrees K) in given city weather('London', config.API_KEY).then((temp) => { res = temp; }, (reason) => { console.log(reason); }); this.body = yield render('index.mustache', {temperature:res}); }); I know the reason that this won't work (async pains) but I've tried alternatives like yielding from the callback and setting this.body within the callback (this approach appeared promising but Koa sends a 404 in this case) but none of those seem to work. Any ideas on how I can make this work?edit: here's the complete code, just in case.

Submitted March 16, 2016 at 06:02AM by kbrgl

Seems like you need a really solid understanding of JS to do anything at all with Node.js, right?

I'm not having "problems" learning Node.js, but I feel like there's a lot of intermediate concepts you have to understand in order to do ANYTHING in Node.js.In Front end JS you can get away with just hacking together whatever works. But with Node.js I'm constantly having to stop, and research, more so than other languages.PHP, Ruby, and Front end JS I could just code and code and code without any real difficulties, and without knowing too much.Node.js on the other hand I feel forces you to dig deeper. Is this the general consensus or have I gone off the deep end?Closures, callbacks, promises, anonymous functions, this, etc... Seems like I can't get anywhere without understanding all of these things in detail.No complaints, just an observation. Feel like it's not a beginners language.. er... Runtime or whatever.

Submitted March 16, 2016 at 04:11AM by fastpenguin91

The Deep Roots of JavaScript Fatigue

http://ift.tt/1SR54n0

Submitted March 15, 2016 at 11:00PM by lambtr0n

[Beginner's question] - how to call different functions like I can do in Google Scripts

Hi there,I'm sorry for the silly question but I'm trying to jump from developing Google Script apps into Nodejs.One thing I can't get my head around is that I can call different functions in Google Scripts, and even call other functions within functions.e.g.:function executor(){ myFunctionOne(); myFunctionTwo(); myFunctionThree(); } So the executor will call my three other functions.Is there a way for node to run and I can specify which function to run or start with? (In this instance it could be executor() )Thanks!

Submitted March 15, 2016 at 10:21PM by turtleattacks

These people are launching their first open source projects tonight!

http://ift.tt/1Wojie4

Submitted March 15, 2016 at 07:45PM by tibastral

V8 Release 5.0

http://ift.tt/1Va6FET

Submitted March 15, 2016 at 07:36PM by a0viedo

MEAN stack beginners tutorial (Improved). Covering Express - Hello World!

https://www.youtube.com/watch?v=YnE4yNgEDss&feature=youtu.be

Submitted March 15, 2016 at 07:07PM by ThomasSmWatson

Socket.io typeof error, any help please?

Here's the relevant part of my codesocket.on('disconnect', function(){ console.log(rooms.length) var destroyThis = null if (typeof socket.store.data.roomi == 'undefined') { for (var i in rooms) { if (rooms[i].roomSocket.id == socket.id) { destroyThis = rooms[i] } } if (destroyThis !== null){ rooms.splice(destroyThis, 1) } console.log(rooms.length) } else { var roomID = socket.store.data.roomi for (var i in rooms[roomID].clientSockets) { destroyThis = i } } if (destroyThis !== null) { rooms[roomID].clientSockets.splice(destroyThis, 1) } rooms[roomID].roomSocket.emit('remove user', socket.id) }) and I get the error if (typeof socket.store.data.roomi == 'undefined') { ^ TypeError: Cannot read property 'data' of undefined To me this makes no sense, I'm trying to check if it's undefined and it's throwing an error because it's undefined?

Submitted March 15, 2016 at 06:42PM by Tomus

WebSocket Connection Refused!

Hey, I am trying to use WebSocket but when I try to the socket via the web-browser script, I get this error on my server ->Connection from origin http://domainhere rejected. Any help will be appreciated!Thanks!

Submitted March 15, 2016 at 05:25PM by farazappy

Need help with authentication and redirecting.

HiThis must be a bit of a long-shot but I need someone to help me figure out authentication in my webappHere is what I want: User opens site , if user is authenticated show him stuff based on his preferences else show a general page. Like RedditThe user wanders the website. Now if a user wants to upvote something , I want them to login.First I check in POST if user is autenticated then regisster upvote and send a JSON {status:done}, else I send {status:notloggedin} and on the front I pop up a modal with the Sign in form. Now when he logs-in it redirects to the initial redirects and I have noway of knowing where they came from ie I cant take them back to that page.Here is the code : http://ift.tt/1pJ9DEz

Submitted March 15, 2016 at 04:03PM by abkibaarnsit

Create a Web Scraper to Gather Information from the web

http://ift.tt/1RLuFbX

Submitted March 15, 2016 at 01:02PM by Code93

Coursera's 4-week Nodejs course started yesterday, is anyone else taking it?

I am enrolled and was wondering who else was enrolled so we can possibly share notes? I am just auditing the course but still want to take it seriously. We can pm to set something up (I like evernote) and kind of hold each other accountable to finish the course. It's a lot of content.This is a link to the course.

Submitted March 15, 2016 at 11:24AM by pyromagnium

Good way to test candidates on ES6 during recruitment ?

Hi guys,I'd like to create a quick technical test for the recruitment of new candidates. I figured it would be a good exercise, given that i'm fairly new to Node myself (about 6 months). Are there some questions that are a must-ask, or a quick development exercise that I could give ?Would you recommend a technical MCQ or a quick program to code ?How do you guys do it ? I've read many things on various recruitement blogs, but I would like to know how people do it in real life, with promises, ES6, etc...Thanks very much :)

Submitted March 15, 2016 at 10:10AM by H3bus

Monday 14 March 2016

Visualize your local network topology in browser based on bonjour protocol

http://ift.tt/1pkMlV1

Submitted March 15, 2016 at 05:49AM by wyvernnot

Help finishing a parsing code

I had a student helping me make a parser for a geoJSON file for a small little homework we are working on. However he left the group and now I have an unfinished code and don't really know how to tackle finishing the code.My experience with javascript/node is zero and its not taught at my school as a course so I cant find much help. Was hoping someone would be able to lend me a hand in fixing the final section of the code.The main purpose of the code is to take in a geoJSON of towns in Massachusetts, and output a new geoJSON that only has the coordinates of the boarder of the state. I will be able to link the geoJSON file in the morning if needed. Thanks to anyone that can assist me in trying to understand this topicHere is the code that he left me.

Submitted March 15, 2016 at 05:12AM by LiLPacket

Tired of poor unicode support in NodeJS regex's? Oniguruma will save the day!

http://ift.tt/1SnkXkS

Submitted March 15, 2016 at 02:50AM by fripperyf91

[Help] Passport authentication with Active Directory

I've been trying ldapauth and passport-windowsauth with no success.Does anyone have a working example to study?Thanks.

Submitted March 14, 2016 at 11:57PM by KokishinNeko

NodeJs & Express tutorial for Beginners (Please give feedback)

https://www.youtube.com/watch?v=EI6L6czJOFA&feature=youtu.be

Submitted March 14, 2016 at 10:18PM by ThomasSmWatson

Using Socket.io

I am currently using socket.io and encountered a problem that I am not sure how to go about. What is happening is that when I shutdown the server and then turning it back on, the socket.on("connect", function(){..}); on the client side is not firing except for the first time the page is loaded. I am aware that the socket keeps trying to reconnect automatically but upon restarting the server but I cannot understand why this event is not being fired.Your help is kindly appreciated.

Submitted March 14, 2016 at 07:49PM by Hanxarin

Designing a RESTful API with Node and Postgres

http://ift.tt/1RZLXoo

Submitted March 14, 2016 at 02:46PM by michaelherman

How to get a performance boost using Node.js native addons

http://ift.tt/1SL7y6c

Submitted March 14, 2016 at 12:40PM by wo1fgang

Sunday 13 March 2016

Made a tool for making it easier to try out some random nodejs modules

http://ift.tt/1QROp1r

Submitted March 14, 2016 at 06:42AM by victorbjelkholm

How do you implement navigation in your template?

Twine 2, Harlow: Audio not working in Webkit distribution

Hey all!I've packaged my Twine 2 game with Node-Webkit, but for the life of me, I can't get my audio to work. Images are working.I am using v0.13.0-rc2I know that I need ffmpegsumo.dll. I downloaded it and added it, but no luck.It may be the wrong version, but I have no idea :(Any help is greatly appreciated.

Submitted March 14, 2016 at 02:37AM by ParallaxBrew

Is there a way to livereload when working with express.js (without gulp/grunt)

I found express-livereload module but I can't get it to work, this is my codevar express = require('express') , livereload = require('express-livereload') , app = express(); app.set('views', './views'); // specify the views directory app.set('view engine', 'jade'); // register the template engine livereload(app) app.get('/', function(req,res){ res.render('index', {'name': 'aurel kurtula'}) }) var server = app.listen(3000, function(){ console.log('3000') }) But it doesn't work.Any recommendation?

Submitted March 14, 2016 at 02:41AM by relio2014

Should I use the Express 4 (generator) or use the bare-bones Express

What should be the ultimate goal

Submitted March 14, 2016 at 01:12AM by relio2014

A partner for building a free cross-promotion server and sdk soluion

I am looking for a partner so we can build a HapiJS and NodeJS server solution which will be open source and will allow developers to share ads between their apps. I am doing it because I have several Android apps which I want to connect.The current cross-promotion solutions are not good enough or just are not totally free. I can program for Android so I can participate both in the server and client Android SDK.I want to build a very simple solution for 2-3 months in the free time after work. Remote pairing is OK.

Submitted March 13, 2016 at 07:31PM by n0_m0r3_pa1n

EJS - For/While loos vs. forEach(function(){

What is the difference betweenforEach(function(user){ // code }); andvar i = 0; while (i < users.length) { // code i++; } Is the forEach more efficient than the standard for/while loops?

Submitted March 13, 2016 at 07:07PM by programming_owl

What are some good practices/bad practices in the layer between the server and the database in a node application?

In a node script, you call http.createServer(). Anything you put outside of this function provides you with an additional scope that you don't get in PHP (I'm a PHP guy).Is this useful in node? Could I preload the entire database outside of the http.createServer method and then stop reading from the database (is it even worth it to do this)? Are there benefits to having this extra scope?Any thoughts welcome!

Submitted March 13, 2016 at 05:43PM by 98_Vikes

What the best way to do emails?

I'm creating a web service that has a few cases where emails are sent (password recovery, update notifications, etc). Some are for small numbers of recipients while others are more of a mass mailing. To keep my service responsive I'm thinking of running a separate Docker container with some sort of "additional server" to read the DB and issue the emails.I'm debating on running another node project with a timer, possibly a socket you could poke to trigger the DB read and subsequent emailing. Another option is to create a Gruntfile and have it connected to a cron job that runs it periodically. Being new to Node development I'm not sure exactly what solution I should go with. Does anyone have words of wisdom on how to solve this type of problem?

Submitted March 13, 2016 at 04:12PM by jecxjo

Is making db.query sync a right thing ?

So, I have a problem building an application that uses a database. After years of PHP, I'm building a site in NodeJS.When building a website that uses a database, I rapidly come over to some problems like what people call callback hell. There's async for that, but what if I simply want to make a one-line query ? Don't discuss performance with me. My PHP Scripts sometimes make over 600 queries in a row and it's still running fine.So, I made a thing to make it work in sync, on a gist. It works flawlessly, but is it right ? Isn't there a better version ?

Submitted March 13, 2016 at 03:47PM by KindlyFire

Express.js Configure Depricated

Hey! I Have this piece of code -> app.configure(function(){ app.set('views', __dirname + '/views'); app.set('view engine', 'jade'); }); But when I run my script, I get -> TypeError: app.configure is not a function I found that .configure is deprecated in v4.x so what should I use instead?Any help appreciated!Thanks!

Submitted March 13, 2016 at 02:04PM by farazappy

Get Nginx (reverse proxy) to display a website if the user hits "/" instead of one of my node app routes?

Hi allI have a node app sitting behind a nginx reverse proxy.The node app accepts API calls on routes like "/api/1" and "/api/2".Therefore, I have no "/" route.I know I could set up a route for "/" and have that return a website, but I have a feeling there is a better way to do this, i.e. nginx returns the website.Have any of you done this before? Could you point me in the right direction on how to do it?Thanks.

Submitted March 13, 2016 at 02:15PM by MEAN_questions

Saturday 12 March 2016

Is there any way to make Node.js console programs responsive to user input? I.e., is there any way to have "press Q to quit or P to pause?"

I have a background process running which basically runs through a whole bunch of numbers. It's fizzbuzz, but that's not important. What's important is that if, say, you're doing the numbers 1 - 10000000000, you might want to abort the process before it's done, but keep the numbers you've already calculated.What I'd like to do is set it up so that while the program's running, if the user presses "Q," it'll stop calculating and just write out the last chunk (I process the file in chunks of 10000 at a time); Normally I work on web-based apps, but this is a console-only application so far, and I don't want to download and install Electron just to get the functionality of "addEventListener()"Any thoughts?

Submitted March 13, 2016 at 06:05AM by BrianBoyko

Node.js Internet of Things system to control cheap 433Mhz-based devices! (stars required :P)

http://ift.tt/1RR6duT

Submitted March 12, 2016 at 11:54PM by roccomuso

async flow control with sonic speed - series, parallel, map, filter, concurrency

http://ift.tt/1oZbww2

Submitted March 12, 2016 at 07:40PM by peterluhb

Fast transparent hostname proxy for Node.js

http://ift.tt/1pmvC48

Submitted March 12, 2016 at 07:01PM by Piercey4

Check out promise-resolve-deep, my lib to recursively resolve promises - works well for implementing APIs

http://ift.tt/1ReDomu

Submitted March 12, 2016 at 06:46PM by RushPL

Friday 11 March 2016

I wrote an inline documentation generator in JavaScript. What do you think?

http://ift.tt/1pdRLkA

Submitted March 12, 2016 at 02:10AM by zlsa

Just found this. Thought some of you guys would like it... - Simplest way to wait some asynchronous tasks complete, in Javascript?

http://ift.tt/1BAwtAY

Submitted March 12, 2016 at 12:17AM by Excham

Can the child process be spawned without a specific command, and be kept alive?

I have to preform thousands of commands on the command line. Currently I'm doing a exec call for every command I want to do. This has to be throttled, since only so many shells can be open at once.I'm wondering if instead, I can just open a few child processes that just execute my commands, and stay open. But it seems child_process.spawn is more geared towards executing the one command and then exiting.Or is there a better way to do bulk commands that I'm unaware of?

Submitted March 11, 2016 at 08:53PM by Inspector-Space_Time

I don't understand how angular, jade, express and node work together

I was following team treehouse tutorials learning node, express then they started adding jade. Im not sure how does jade integrates with angular. Is jade something i have to use if using express?

Submitted March 11, 2016 at 08:17PM by nomadProgrammer

Server sided help

Hello everyone. My name is Tim, I am 14 years old. I have been web devoloping for quite some time now and I would say that I am pretty good at HTML, CSS and Js. Currently I'm trying server sided stuff, which I don't find too hard. The only part I am very bad at is communicating between the server and the client. I am using Node.js with express and socket.io. I am quite new to it but understand it, but I wouldn't mind switching to another language like PhP if that's what it takes.I'm currently busy with a website that makes users able to upload a link that makes them join a CS:GO lobby. Basically that means people paste a link and a description, press create and a div will appear with peoples lobby links, which makes them able to join their games. I want those divs to disappear after 15 minutes. The problem I am having is how to save those divs so they will appear even when you reload the page, and remove them after 15 minutes.I am currently available so if someone could assist me via Skype/Teamspeak that would be great. All comments are helpfull, I can post some code and the parts which I think specifically are wrong.

Submitted March 11, 2016 at 08:18PM by timgfx

Node.js HTTP Server CPU Leak from Long Responses (Node.js 0.10 mostly)

http://ift.tt/1LX7IWO

Submitted March 11, 2016 at 07:06PM by ramon_snir

What is the correct way to use different folder?

I'm trying to develop a simple web app and I can't find a way to use different JS files stored in a different folder from the root one, I'll try to explain better.. this is my file structure:myapp ├── clientSide │ ├── downloads.html │ ├── getDown.js │ ├── index.html │ └── uptime.js ├── index.html.save └── serverSide └── myapi.js The server is running myapi.js and this is chunk of the code:app.use("/clientSide", express.static(__dirname + '/clientSide')); console.log(__dirname); exec("sudo /sbin/ifconfig eth0 | grep 'inet addr:' | cut -d: -f2 | awk '{print $1}'", function(error, stdout, stderr){ ip = stdout; exports.ipAdd = ip; console.log(ip); }); now..the problem is that from index.htm I can't import and use the JS files inside the clientSide directory using a simpleandcan anyone please edit my piece of code in order to understand? Thanks!

Submitted March 11, 2016 at 04:43PM by Fabbio1984

Beyond signed cookies/JWTs: Authenticated encryption. Crypto advice?

Hi all, I've used lots of signed cookies (e.g HMAC) and JSON Web Tokens (JWTs).They're great for storing sessions without a database! ...as long as you don't have sensitive information inside, because it's all visible to the client.So, how about not just signing, but also encrypting?My research is pointing me to aes-256-gcm as good algorithm that both encrypts and signs a plaintext. The aes-256 part is a standard algorithm, and the gcm part means that it also allows to verify the authenticity of the message (which apparently isn't a given with other algorithms).Here's my understanding of how the process works on node.js, and I'm looking for feedback.Start with a JSON payload, which contains the session contents.Generate a random 12-byte initialization vector.Encrypt the payload with aes-256-gcm (crypto.createCipheriv('aes-256-gcm', key, iv))Get the "authentication tag" which serves as the authenticity signature (cipher.getAuthTag())The result is 3 values, which can be then base64 encoded and concatenate together to form a signed, encrypted token:The initialization vectorThe auth tagThe ciphertextDecryption uses crypto.createDecipheriv('aes-256-gcm', key, iv) and decipher.setAuthTag(authTag)I'm looking for feedback on this process. Is this a proper use of GCM? Does this make cryptographic sense?Inside the payload, JWT claims can be used (like an expiry time) and can be checked as a second step, after decryption.Are there caveats I should look out for? Is this paying a high price in performance, as opposed to just HMAC signing? Does the tradeoff make sense?

Submitted March 11, 2016 at 04:01PM by ecmascript2038

"global" objects and variable

Hey guys,following two questions:How can I share a variable between e.g. routes? I need to access it in a route path and a middlewareIs require "global? Having the following file:*var mysql = require('mysql'); var pool = mysql.createPool({ connectionLimit : 100, host : 'localhost', user : 'root', password : 'password', database : 'database', }); module.exports = pool; When using var db = require('../db') in multiple route paths, is it a single global pool or is a new pool initiate for every route? If it isn't a single one, how can I achieve this behavior?

Submitted March 11, 2016 at 01:19PM by ArghusSquare

InversifyJS Node.js live demo

http://ift.tt/1Rb8SQR

Submitted March 11, 2016 at 12:18PM by ower89

I created a Node.js server that helps me build iOS apps on any notebook

http://ift.tt/21ZFEGh

Submitted March 11, 2016 at 12:25PM by wo1fgang

How to set up test file

This may be a dumb question. The situation is that a Node app was created and then put into a Vagrant box (so that it can be easily passed around to members of the team). So the app works when you do "vagrant up" and you can see the app via localhost in your browser.The app needs unit tests run against it. The app contains a whole bunch of different js files. Now let's say we create a file to contain the unit tests called "testfile.js". How will "testfile.js" be able to access all of the functions inside the app? What needs to be done?The testing will either use Painless(which comes prepackaged with Sinon and Chai) or Tape + Sinon + Chai + any other needed npm modules (possibly proxyquire).Any help is much appreciated!

Submitted March 11, 2016 at 11:41AM by the_tester888

How do you monitor your Node.JS app and/or server

Starting to grow the amount of Node.js apps I manage (hosted on a EC2 instance with NGINX in front). Up till now I've been sending basic emails when there are issues but I want something more robust. Looking around there are * keymetrics.io * New relic * App Dynamics But these all cost monthly. There is Node-monitor which looks promising and you can write customer alerts based on thresholds but I was wondering what everyone else does?

Submitted March 11, 2016 at 11:46AM by xajx

Thursday 10 March 2016

Synchronize a variable from server to client

http://ift.tt/1AOeFPF

Submitted March 11, 2016 at 04:15AM by Handsome-Beaver

Minimal JSX compatible html focused templating engine.

http://ift.tt/24U7fLs

Submitted March 11, 2016 at 03:49AM by Piercey4

ES6: Break it up

http://ift.tt/1RaQUHQ

Submitted March 11, 2016 at 12:55AM by rrowland

Stateless JWT with no sessions - Is this for front-end only or can I use Jade as well?

I'm working on getting a JWT strategy going on Passport.js and I've had success with testing the Authorization through the header calls.However, I want to build some back-end administrative pages in Jade and I want to be able to continue passing the token when the user clicks links that get produced by Jade.Is it not a good idea to send the token through a query string in the URL? If that is the case, how can I tell Jade that any interaction with that page needs to use the token in the header?

Submitted March 11, 2016 at 12:18AM by sdawson26

Just starting express, how do I get my external api to display in a view?

I built an api with rails and have a huge headache after searching for this over the past few days. I can't seem to find a simple or straightforward solution on stackoverflow...In app.js I haveapp.get('/', function(req, res) { res.render('index', request(url, function(req, res, body) { res = JSON.parse(body) console.log(res.events[0]) } )) I'm able to print out my api response in the console, but can't seem to figure out how to get it in my view. I get 'Cannot read property 'length' of undefined' when I try `- each event in res'Anyone have an idea what I'm doing wrong?

Submitted March 10, 2016 at 09:23PM by imicit

NodeJS Options for Personal Project

Hey guys,I am pretty new to NodeJS but am wanting to take on a pretty extensive person project. I am hoping NodeJS is the right solution.I have some data that I will be pulling every 15 minutes. Said data contains auction info that I will be parsing through to compare different things.In my mind I will have 2 tables in a DB (Mongo?): Active and Expired auctions.I will then query the DB and throw what I want on a webpage.My ultimate question is, how would I do the scheduling of these tasks with NodeJS?Would MonogoDB be the best solution?Any help would be greatly appreciated.

Submitted March 10, 2016 at 05:31PM by Ebola300

A mortal command line prompt inspired by Sektor

http://ift.tt/1SCS8AY

Submitted March 10, 2016 at 04:57PM by bucaran

Actionhero + CORS + Web Sockets + BootStrap... Example Project

http://ift.tt/1UibjQo

Submitted March 10, 2016 at 04:11PM by evantahler

Groupme bot with reddit integration?

I followed this tutorial on making a groupme bot. I'm a total beginner so I don't know much beyond that. Does anyone have a push in the right direction as to implement reddit integration? Ideally I'd like to just pull a random top link (for the day probably) from a subreddit and post it's image in the Groupme chat.Thanks!

Submitted March 10, 2016 at 02:32PM by somehobo606

Ideas for node beginner project to help understand the basics/fundamentals?

So I have been learning node like for 6 days and wanted to give a go at a smallish project to start learning.I though maybe a simple web app that I can create a bucket list, with all typical CRUD methods and maybe re-arranging the order of the items in the bucket list. In where I can use node and Mongo.Any other better ideas appreciated!

Submitted March 10, 2016 at 01:14PM by nomadProgrammer

Introducing InversifyJS 2.0: A powerful IoC container for JavaScript apps powered by TypeScript

http://ift.tt/1pa2Jrj

Submitted March 10, 2016 at 11:42AM by ower89

Reliable Node.js ORM for RDBMS

Hello,Does anyone have any advice on what ORM to pick for a new node.js project?I went through an knex/bookshelf tutorial a while back but i'm a bit confused over how to implement it in es6 format (particularly how do i convey http://ift.tt/2253xfy in es6?)Someone also suggested using Objection.js in another post. What is the difference between the two(objection & bookshelf) if any at all?

Submitted March 10, 2016 at 09:02AM by Azrael__

Wednesday 9 March 2016

Using global variables between Server and Client

How do you maintain a lot of private npm packages in your company?

We have a number of projects in our company and we want to share a number of npm packages between them, ranging from React components, string formatters, object validators, helper functions, Express middlewares, etc.Do you use a monorepo? Separate git repos for each npm package?

Submitted March 09, 2016 at 06:36PM by dscer

Open Source Node Projects

I am building a project using Node, Express and a MySQL database. Every example project that I find is way too basic. They all make database calls directly from the routes and are 90% of the time just fetching "to-dos" or "users".I am looking for something taken to the next level than a basic MVC project. What happens when you need to make multiple queries on the database, parse that data, and then return it to the view? What are common design patterns used for this? What about common data that needs to be passed to and rendered in every view (for instance the navigation page titles)?Are there any good open source projects that anyone can recommend I check out? I don't want something overly complex, but something a little more beefy than the to-do examples out there.

Submitted March 09, 2016 at 05:48PM by programming_owl

Setup simple website using Node.js, Express, Nunjucks, Gulp and Nodemon. Idyllic software

http://ift.tt/222gTt5

Submitted March 09, 2016 at 12:17PM by poonam_idyllic

Primus 5.0.0 adds new faster transformer

http://ift.tt/1U3aa0p

Submitted March 09, 2016 at 09:22AM by alexhultman

Tuesday 8 March 2016

openframe.io "a platform for displaying digital art" ‪#‎nodejs‬ + ‪#‎RaspberryPi‬ + ‪#‎HDMI‬

http://openframe.io/

Submitted March 09, 2016 at 05:02AM by bishopZ

Any recommendations on an open source distributed file system to use with node.js for storing PDFs and images?

Unfortunately we can't use s3. They want us to self host it. Is hdfs with node the best option or what would you recommend?

Submitted March 09, 2016 at 02:54AM by -proof

Node, Mongo and KeystoneJS - where to start to build a advanced filtering search?

I'm looking to build an advanced search with filtering, however I don't know where to start, googling if proving hard to find definitive answers so I thought I'd ask the node forum.I'd like to build this under KeystoneJS CRM and take advantage of its relationships features. Ironically, the backend has the same filtering functionality that I'd like to build for the front end, however it's not abstracted into a package or the like.Can anyone point me in the direction of building something like the filter button at http://ift.tt/1URbz9H (login: demo@keystonejs.com, pass: demo) but for the front end? I'm going to try and reverse engineer this from the github source....

Submitted March 09, 2016 at 01:23AM by FickleLife

Doclets.io now featuring embedded playgrounds for JSDoc @example. Hot or not?

https://doclets.io

Submitted March 08, 2016 at 09:58PM by gelipp

BuiltWithMeteor Weekly # March6th2016

http://ift.tt/1Yt6jZT

Submitted March 08, 2016 at 08:03PM by bogdancloud

Realtime Doesn’t Belong Everywhere — Build Scalable API Services in Node.js with Nodal (x-post r/javascript)

http://ift.tt/1LPoTt9

Submitted March 08, 2016 at 07:43PM by keithwhor

Beginner needs help: Captive portal with nodejs !

hello everyone.I am currently a student using SailsJs on my raspberry pi for my project.it is basically a real-time answer with yes and no answer with real time results. the plan is the raspberry plays as an access Point and dhcp server and when you connect the page opens up asking for your 'vote' and you get the dynamic results directly, on your smartphone.everything is going well. the problem is, I am stuck at the Captive portal. you can connect to it fine, dhcp is all good except for the Captive portal.here is where I need help. I am unfamiliar with nodejs and sails, I need to make the pop up page appear. I can do it with apache, but being a different Web server I'm in bit of trouble. deadline is coming real soon, too.I need someone to sit down with me and help me get this working. I can exchange this service for multiple things: I speak 3 languages , am pretty good with networking and server administration (except here, hehe).I am willing to help out whenever I can.thank you in advance and thanks for the read.

Submitted March 08, 2016 at 07:19PM by Dreadredd

what are your experiences with express, koa, hapi?

As on the tin. I'm just curious.The reality with frameworks isn't about "which one is best" but which one is easiest for you (conversational 'you') to understand and make work.That I should spend less time perseverating on which one to use, and just pull the trigger. I can't imagine that choosing one for my little side project would wind up being wrong.

Submitted March 08, 2016 at 05:07PM by monsto

Who can explain callback Fns in the easiest, simplest, human readable way possible????

No text found

Submitted March 08, 2016 at 04:55PM by jsteenb2

Where ORMs go wrong

http://ift.tt/1ntXKR5

Submitted March 08, 2016 at 04:28PM by kapv89

[question]How to do Jenkins deploy of Nodejs apps?

Getting started with node/express and Jenkins CI, and running into some issues...I have a simple express app that is running continuously (think your basic webserver)when i am ssh'ed into the server, i can run:node index.js& which will start the express app, and allow me to start doing other things.The issue i am having is with jenkins for the jenkins builds, i go have some jenkins shell build steps that goes through what i would do locally:1: npm install/unit tests etc.2: "start the server"the start the server part, what i am doing is SCP node_modules/ and needed files over to the server, and execute thenode index.js& command...however jenkins seems to be hanging up on it, and returning the build as unstable.So my questions is, what is the "Proper" build method for apps to be deployed to "production"

Submitted March 08, 2016 at 04:31PM by T-rex_with_a_gun

InversifyJS v2.0.0-alpha.2 is out 🚀

http://ift.tt/1pdsoQA

Submitted March 08, 2016 at 04:02PM by ower89

default args , giving me error

function readUsername(userName = [ ]) { let name = userName.length console.log(name); } unexpected token

Submitted March 08, 2016 at 04:11PM by 73mp74710n

k7 - Connect you database with Hapijs made easy

http://ift.tt/1U1xX0J

Submitted March 08, 2016 at 02:43PM by thebergamo

Isolated Unit Tests with Sinonjs

http://ift.tt/1p4QVXb

Submitted March 08, 2016 at 01:06PM by kostarelo

Tech Book Face Off: Practical Node.js Vs. Node.js the Right Way

http://ift.tt/1YpzgWL

Submitted March 08, 2016 at 12:17PM by wo1fgang

[Question] Socket.io Server

If I have the client side script say client.js can it be reverse engineered to create the server side script say server.js?

Submitted March 08, 2016 at 09:07AM by farazappy

Monday 7 March 2016

Easy server/client data access and synchronization.

http://ift.tt/1AOeFPF

Submitted March 08, 2016 at 04:28AM by Handsome-Beaver

Nodal Goes API First with 0.8 Release

http://ift.tt/1p3O4xR

Submitted March 08, 2016 at 03:45AM by keithwhor

Using node, how can I login to websites and scrape the web?

As a hobby, I want to write scripts to automate certain things. For example, what if I wanted to reactivate my facebook, user cheerio.js to scrape it for info (nothing malicious), then deactivate it again all at once? Is this possible?I ask because I use the request library to get to reddit, and filling in the username and password options allowed me to log in to reddit. But doing the same thing didn't work with facebook. It's a little difficult with facebook because it seems to use some javascript click event on the login button to even log in (which you can't access except by trying to decipher the minified js file which at that point it's not worth it) so I can't figure out how to login from a script.I know some sites have APIs but I want to be a ninja and just write my own scripts from scratch.Is there some standard way to log into any website?

Submitted March 08, 2016 at 12:39AM by 98_Vikes

Troubleshooting an error in my MEAN app when updating to Node >4.0

I am currently getting an error that is widely reported on the web, however the solutions provided are either a hack (demonstrated below), or do not work for me.I am running the app on Mac (Mavericks), on Node version 0.10.31, and (since I'm assuming this has something to do with them) Mongoose 3.8.x and MongoDB 2.6.7The trouble began when I updated Node and npm to 4.3.2 and 3.8.0 respectively. When I start my server, I get the following error printed in the console, and then the server proceeds to function as normal. { [Error: Cannot find module '../build/Release/bson'] code: 'MODULE_NOT_FOUND' } js-bson: Failed to load c++ bson extension, using pure JS version From my troubleshooting, it seems like it has something to do with Node, npm, and mongoose. The following advice was what I could find online:1) This is just a warning (not an error), ignore it.Who wants to leave warnings in their code? Besides, this could signify a worse underlying problem with the build.2) bson package nested within the Mongoose module needs python (wtf?) to build. Ensure python is set to version between 2.5 and 3 (exclusive).I'm not experienced enough to figure out what python has to do with the build, but my python is version 2.7.5.3) Go into the deeply nested bson package in node_modules and change a line in the index.js file from require('../build/Release/bson') to require('bson')Haven't, nor will I, try this approach. This is a hacky fix that will cause problems on future npm module installs/upgrades.4) run "rm -rf node_modules && npm cache clean && npm install"This seemed to be a fix for a lot of people online, but unfortunately, it does not fix the problem for me (but it does help: see below)So far, I have npm installed n so that I can play around with different Node versions, as well as different npm versions. Every time I switch to a different combination of versions, I run the line from advice #4 to rebuild the node_modules folder.So far, I've found that when I go back to Node 0.10.x, I do not get the error message, no matter what version of npm I use (at least, not with 2.14.x and 3.8.0).I do get the error with Node 4.3.2 and 5.6.0, regardless of npm version. So it seems like npm is not the problem.Hopefully this was enough information to go on. Has anyone else experienced this problem or know what's going on?In the meantime, I'm going to try updating mongoose to 4.x, as it's likely due to Mongoose not up to date with Node's recent changes.

Submitted March 07, 2016 at 10:41PM by ubccompscistudent