Monday 30 November 2015

Connect Multiple Domains, Teams, Organisations on Slack

http://ift.tt/21qR9Hn

Submitted December 01, 2015 at 07:12AM by SHIGGA

ES6 Store events differ between browser and server?

I am using the following as a basis for learning the basics: http://ift.tt/21q4xLK am not using their authentication, and auth is not an issue. The problem I am having is events right now.I am using their BaseStore, and LoginStore (with modifications to remove their jwt items).I've used console.log(this) to compare the LoginStore on the server and in the browser and have found that the server version only contains one event, assigned to it in the constructor, while the browser version says it has two... the one added in the constructor, and the one added to it within the AuthenticatedComponent.jsx file.The only event that fires when CHANGE is emitted is the listener set up in the constructor. I'm assuming that I have two instances of this class, but only one is being called. I've also confirmed that I am only importing the LoginStore once.

Submitted December 01, 2015 at 01:26AM by thrownaway21

How can I structure this?

Hey,I ran into some issues while creating a simple web scraper.Here's the deal.Fetch 100 pages in parallel.Get page ID of each urlAdd person name and id to the database (person ID will be the same with page ID)Each person has one, two or three professions. Fetch these profession names' from pages, add them into database if they don't exist and add these to the pivot table.Each person has at least one photo, fetch those too and add it to the pivot table.What would be the fastest way to achieve this? I'm kinda new into promises, callbacks, requests and everything.

Submitted December 01, 2015 at 12:33AM by laraveling

lagerjs - Simple and organized log aggregation and flushing

http://ift.tt/1XsRKsG

Submitted November 30, 2015 at 10:02PM by lepuma

Automated Cat feeder with Node.js

http://ift.tt/1OAe8Zn

Submitted November 30, 2015 at 07:58PM by dynamicallytyped

"Node.js Best Practices." What are some of yours?

http://ift.tt/1sLXyOb

Submitted November 30, 2015 at 07:34PM by monsto

When is it expected to perform an operation sync/async?

I've been about a week trying to figure out how to do a callback that reads a file and returns the contents of the file to a variable that's available to the rest of the program. I figured that it's a "learning project" so I may as well get used to callbacks and later I'll delve into promises. I mean the exercise was more about recognizing when to do async vs sync.So Today I Learned that data inside a callback is unavailable to anything outside it... Ever. You can bring parameters into the callback function and do some work on it in there, but you're can't bring the result back out and put it, say, in a global variable. (if this is a wrong answer, please share.)Further I realized..."Oh... Duh... I don't necessarily want to be doing anything with the contents of the file before it's completely loaded, so I may as well use fs.readfile synchronously."What would be a good example of when it's best to do something sync/async?

Submitted November 30, 2015 at 07:44PM by monsto

Node, Postgres, MassiveJS - A better database experience

http://ift.tt/1Rh20PB

Submitted November 30, 2015 at 05:40PM by craig081785

Node.js promises and bookshelf.js (Help)

http://ift.tt/1Iw4pia

Submitted November 30, 2015 at 05:09PM by laraveling

Frodo - Rails-like app generator for Node and Express

http://ift.tt/1lQmHGf

Submitted November 30, 2015 at 03:40PM by dynamicallytyped

Trying to Find Cheap Node.JS App Hosting This Black Friday. Any Advice?

Hey y'all,I'm a complete Node.JS newbie, and I'm trying to find a cheap but useful hosting solution this Black Friday. Currently, I'm looking at Digital Ocean and OpenVZ, which are relatively inexpensive, IaaS hosting services.My questions are:Did I even look at the right services to begin with?Is there something else I should be looking at?2a. If so, could you please give me some recommendations?Thanks in advance!

Submitted November 30, 2015 at 02:08PM by caesaraugustus9001

Express Async Router - An Express Router wrapper which automatically manage Promises.

http://ift.tt/1NikkSk

Submitted November 30, 2015 at 01:12PM by Touchify

How do you create JSON Schemas?

JSON Schemas are definitely helpful in many cases. Many people realize that, but are too lazy (me! me!) to create and maintain them. To create your first schema you can just take your JSON and go to http://jsonschema.net/ , generate it and tweak by hand, but how to maintain it later?My questions are:Do you create everything by hand?Do you have some editor with syntax checking? (which editor and which plugin do you use?)Is you schema really always up-to-date?Do you use your schema for automated testing, building a documentation or both? (or something more?)

Submitted November 30, 2015 at 12:38PM by meehow808

How to Create a Slack Weather Bot

http://ift.tt/1SrGWo7

Submitted November 30, 2015 at 12:56PM by SHIGGA

Looking for functional and functional reactive programming suggestions for a upcoming TypeScript cookbook

I'm writing a TypeScript cookbook and one of the chapters will cover functional programming and functional reactive programming. I'm looking for content suggestions.My plan right now is to start by talking about the array map, reduce, filter... methods and then move to some libraries like:underscore.jsLazy.jsBacon.jsRamda.jsinmutable.jsRxJSmonet.jsbilbly.jswu.jsfn.jsMy problem is that that list contains too many libraries so I would like to ask for help to find out which libraries I should focus on and what kind of recipes you would like to see in the book? Reddit members will get a promo code once the book is out for the invaluable help! Thanks in advance :)

Submitted November 30, 2015 at 10:13AM by ower89

ArrowCMS - new Nodejs CMS base SQL database

Hi everyone, We make a new CMS base on Express and SQL database http://ift.tt/1Xr7exl Try this and help us make it better Thank you

Submitted November 30, 2015 at 09:14AM by trquoccuong

Run a Shell Script and pass arguments from user to it using node js?

So i have a shell script in server (node js) and want to execute that with arguments? How do i go on doing that?

Submitted November 30, 2015 at 08:18AM by isachinm

Sunday 29 November 2015

Help with my first node app (express and sequelize)

I'm trying to create a simple app that will post data to sqlite database and display upcoming messages. My issue is that my sequelize model is not recognizing the request body. In callback for the "/greeting" route I print the request body to the console, but I'm having a hard time understanding why when I call Greeting.createGreeting() I get a "Cannot read property 'body' of undefined" error. Any help and advice in general is appreciated!code

Submitted November 30, 2015 at 06:33AM by whenyousaywisconsin

I just made a module called DreamJS that creates json random data based on schemas, and I would like you to give your opinion.

http://ift.tt/1Sr4lWJ

Submitted November 30, 2015 at 02:17AM by Zartharus

Refactoring 3k line Node.js file

The project grew too fast and as a result everything was compacted into a single file. 5 hrs in and I feel my brain getting happier. Any suggestions for other things to think about while it's being transformed?

Submitted November 29, 2015 at 09:45PM by deathslocus

Odesza - Clean, expressive templates with multiple inheritance and pure inline JavaScript

http://ift.tt/1l0LGGB

Submitted November 29, 2015 at 09:37PM by wellsjohnston

Request, Cheerio and Promises

Hey, I'm trying to make my web scraper work, but it echoes nothing on the console. Could you please check it out, I think I'm doing something wrong.NON WORKING VERSION (using Promises)var entities = require("entities"); var request = require('request'); var cheerio = require('cheerio'); // create promisified version of request() function requestPromise(options) { return new Promise(function (resolve, reject) { request(options2, function (err, resp, body) { if (err) return reject(err); resolve(body); }); }); } app.get('/fetch', function (req, res) { var promises = []; var headers = { 'User-Agent': req.headers['user-agent'], 'Content-Type': 'application/json; charset=utf-8' }; for (var i = 1; i < 10; i++) { promises.push(requestPromise({url: "http://ift.tt/1YBHxHw" + i + "/personname.html", headers: headers})); } Promise.all(promises).then(function (data) { // iterate through all the data here for (var i = 0; i < data.length; i++) { if ($ = cheerio.load(data[i])) { var links = $("#container"); var name = links.find('span[itemprop="name"]').html(); // name if (name == null) { console.log("null name returned, do nothing"); } else { name = entities.decodeHTML(name); console.log(name); // it doesn't echo the name, WHY? } } else { console.log("can't open"); } } }, function (err) { // error occurred here }); }); WORKING VERSION (Ugly and not in order, that's why I'm trying to move into Promises)var entities = require("entities"); var request = require('request'); var cheerio = require('cheerio'); app.get('/back', function (req, res) { for (var y = 1; y < 10; y++) { (function () { const id = y; var url = "http://ift.tt/1YBHxHw" + id + "/personname.html"; var options2 = { url: url, headers: { 'User-Agent': req.headers['user-agent'], 'Content-Type': 'application/json; charset=utf-8' } }; request(options2, function (err, resp, body) { if (err) { console.log(err); } else { if ($ = cheerio.load(body)) { var links = $('#container'); var name = links.find('span[itemprop="name"]').html(); // name if (name == null) { console.log("null name returned, do nothing"); } else { name = entities.decodeHTML(name); console.log(name); // it echoes name, so it works. } } else { console.log("i couldn't open it"); } } }); }()); } });

Submitted November 29, 2015 at 06:01PM by laraveling

Node.js limit ram usage

Hi,I have a VPS that has only 1gb of ram and I run a web scraper on it, but I run out of memory and I get "process is killed" error after a few minutes.How can I limit memory usage to, say, 512 mb?I found the command below but I couldn't make it work, I'm probably using it wrong. When I enter it on the terminal, my server doesn't start. I press CONTROL + C and press npm start to start my server, but I still run out of memory.node --max-executable-size=192 --max-old-space-size=256 --max-semi-space-size=2 app.js

Submitted November 29, 2015 at 01:36PM by laraveling

Storage options? (Performance vs Ease of Use)

There aren't many discussions on various storage options for Node.What are some proven solutions with high IOPS (operation bandwidth)? I know MongoDB and MySQL are well-defined standards, but in the world of Node I'm sure there are many other options. I'm finding NoSQL options to be potentially ideal.

Submitted November 29, 2015 at 12:16PM by Neotelos

node.js running on an Airbus 350xwb

http://ift.tt/1TbjbAA

Submitted November 29, 2015 at 08:28AM by valtsu

Saturday 28 November 2015

Empujar: an ETL tool written in node.js

http://ift.tt/1MLTy7Z

Submitted November 29, 2015 at 02:20AM by evantahler

Would you help me selecting what to try next? (Vagrant, RAML/Swagger, Babel/Typescript)

I’m going to start a new low-priority project, and I want to try some technologies I’m not using right now.But…well…there’s TONS of new things to try! Yesterday I was hunting info to make a list of what I may like to try, and were overwhelmed by the size of the list I ended with.Could you help me with some doubts about them, and how to assemble the puzzle? First of all, I’m having trouble teaching some of my team members because of the differences in software/hardware between what I use, and what they use. Because they are always having strange situations with they editors, node versions, saying that in their computers the last commit doesn’t work, or that in theirs it did!I’m so sick of this situation.And then I read about Vagrant. Do you recommend me this way to try to solve our problem?Right now I’m working with node on my system, and I don’t understand for sure how to work with vagrant on my server. The code I edit is in a folder of my computer, I test it…and then I commit the changes to our git.How is the workflow with Vagrant? I need to have the code in the vagrant VM, having mounted the server as a folder i my system, and then try it with a terminal from ssh? Or there is a better way? And I’ll lose the commodity to refresh my browser automatically after changes, isn’t it?BTW, I’m working with VSC under Mac, right now. For this API, I want to try RAML or Swagger…but can’t decide between them.The two of them looks great! Swagger have a lot of community projects on GitHub…but RAML have great companies behind (and being younger, it's normal to have less projects, isn't it?)And I want to secure it with JWT: Swagger do no supports JWT right now, isn’t it? And, finally, Babel and/or Typescript. I would like to try the new options of ES2015, and then Babel…...but Typescript looks great, and I really like the the idea of trying before Angular 2 arrives.I feel like having the two of them at the same time will be overkill. And I’m having a hard time deciding between them the one to try first (I don’t know how much time will pass until the next opportunity to try new things) I know this is one hell of a wall of text, but I don’t know where I could ask about it better than here at reddit :) I had bad experiences at other sites, specially StackOverflow, that I’ll just say that aren’t as friendly as reddit.

Submitted November 28, 2015 at 11:49PM by arkdelkaos

Escape strings

Anyone can tell me a good escape strings package, Just like PHP string "real_escape_string" but for node I wan't to use that for mongodb or Express requests. Ty for any help

Submitted November 28, 2015 at 10:21PM by 3nvi

How to you continuously deploy?

Hi, I've been looking for new strategies to optimize the deployment of our nodejs apis. Here's our current workflow:Developer build on a feature branchAfter review, the PR is merged on masterGit notify our CI tool (Circleci)CI checkout the branchCI npm installCI npm testif tests pass, the app is build with docker and the container is pushed on docker hubCI tool sends a SSH command to pull the new container on docker hub and use the new container (stop the old, remove the old, start the new)We could replace docker with a rpm or tar file.What I don't like is the ssh command that we have to send to the server (we need to know the server IP, we need to have ssh open, we need to give a ssh key to our CI tool).What is your workflow to deploy automagically? Anybody has experience with the suite from Strongloop?

Submitted November 28, 2015 at 09:23PM by AshMercy

Designing a fault-tolerant services server, where to start from?

Hi everybody, I have some experience in node.js and I think it came the time to learn a little bit about how to create a fault-tolerant server of services with this technology.But I have no idea of where to start from! any ideas?If you want, there's a more detailed definition at stack overflow: http://ift.tt/21ldMgq you very much in advance.

Submitted November 28, 2015 at 12:24PM by r01010010

Promise Based Scraper in Node.js

http://ift.tt/1LELDFt

Submitted November 28, 2015 at 10:33AM by SHIGGA

Help! I think I'm having problems with variable scope.

I wrote a "route manager" file for my application. It takes in a routes.json file, and registers the routes in Express, based on whether they use a view or a custom JavaScript file in routes/. Furthermore, if it uses a Jade view, it adds in some variables: if the JSON contains "variables": { "foo": ":bar" }, it adds the variable foo with value req.params["bar"].My problem is that this only works once. For instance, suppose that the Jade view is p=foo, and that the route is /:foo/details:The first time I request /2/details, the page shows "2".From the second time on, whenever I request eg. /5/details it still shows "2".In fact, using debug statements, it turns out that the first time my route generator has options == {"foo": ":bar"}, but the subsequent times it has options == {"foo": "2"}.Any idea of how to fix this? Or perhaps libraries that already accomplish what I'm trying to do?Here is a minimal example of the algorithm in question.

Submitted November 28, 2015 at 10:20AM by ZugNachPankow

Hammer - A Node, Express, MySQL, Passport and Jade starter kit.

http://ift.tt/1Huo47c

Submitted November 28, 2015 at 07:46AM by codeplanet

Friday 27 November 2015

Template for node modules with ES6+, Babel, tape and npm scripts

http://ift.tt/1JFcJBX

Submitted November 28, 2015 at 07:37AM by bucaran

Any Node shops in Vancouver?

Hey all,I am a soon to be BTech grad excited go into developing, however have been having a hard time finding any nodejs shops (or at least node js openings) in Vancouver. Does anyone know of some nodejs shops in Vancouver or the lower mainland BC, Canada?I am in the process of exercising more of my Google-Fu but i figured it couldnt hurt to ask on here as well.Edit: mods please take this down if its against the rules. I'm on mobile and checked the sidebar but couldn't find any rules against it.

Submitted November 28, 2015 at 05:30AM by TLI5

Browsersync + Nodemon + Express - Express Side Changes Not Refreshing in Browser

Using Gulp. Express is handling my Jade views, as generated with the Express generator with defaults (this). Here is my gulpfile.Servers start up fine. Editing css or js reloads the server as intended, but editing my Jade views doesn't. If I manually reload the page, the changes are applied, though.Considering all this, I must be close to getting this working correctly, but for the life of me, I can't figure it out.

Submitted November 28, 2015 at 03:27AM by krypt_o

How would I go about this?

I am looking to create my first Node.js project. What I need is for users who fall under a category to view content for their specific category. There also needs to be a super user who can add and remove these users from their category.I know express will be needed but how would I go about authenticating this

Submitted November 27, 2015 at 10:54PM by Flabagaf

Where do you guys go to bring your node apps online?

Right now, I can play around with my creation in localhost and with computers connected to the same router I am.But how do I get online? Where do you guys go?

Submitted November 27, 2015 at 10:55PM by JonFrost

Can someone explain how to use this module with a while loop?

I am trying to open a stream with an array of 30 items. I need to make sure that no more than 10 requests are sent at once. I can't really understand the docs. How can I use this with a while loop?http://ift.tt/1h9QB4c

Submitted November 27, 2015 at 08:41PM by imgurceo

Social Authentication with Passport.js (updated 11/27/2015)

http://ift.tt/1YyeAMr

Submitted November 27, 2015 at 06:25PM by michaelherman

Framework agnostic router using es7 / es2016 decorators

http://ift.tt/1XvIrTw

Submitted November 27, 2015 at 01:13PM by mastilver

Trying to create a basic server but output messages aren't printing.

Hi there!I'm new to using Node JS and have been following along with a tutorial to help me learn how to set it up and use it.Only problem is I can't seem to get any of my outputs to print while setting up the server. Here's what it's doing and here's the code I'm using.When I go to the node.js command prompt and type node [enter] console.log('test');it prints: test undefinedSo I don't think it's a matter of it being installed incorrectly. Either way, if someone can help me out I'd very much appreciate it. Thanks in advance!

Submitted November 27, 2015 at 10:19AM by thatprogrammingnewb

Node.js discloses two critical security vulnerabilities

http://ift.tt/1lNBamc

Submitted November 27, 2015 at 08:17AM by programreneur

Thursday 26 November 2015

Regarding mdns on node.js with socket.io

I am trying to build a socket.io service that clients can discover servers over mdns. I kind of got some of it nailed down, but I can't figure out how to make the mdns browser part working. Ideally, clients would discover servers on their own and connect to it with socket.io-client.// server.js var mdns = require('mdns'); var http = require('http'); var io = require('socket.io'); var ad = mdns.createAdvertisement(mdns.tcp('http'), 8000); ad.start(); var server = http.createServer(); var socket = io(http); server.listen(8000); Now the client side is where it gets complicated for me:// client.js var mdns = require('mdns'); var io = require('socket.io-client'); var browse = mdns.createBrowser(mdns.tcp('http')); browse.on('serviceUp', function (service) { var socket = io.connect('http://' + service.host + ':' + service.port); // this will get lots of "service" objects for every interface (I have multiple network interfaces). Which I only need one socket.io connection. How do I maintain 1 connection and forget the others? }); browse.start(); Client.js idea 1:// initialize socket variable outside of listener. var socket; browse.on('serviceUp', function (service) { if (socket === undefined) { socket = io.connect('http://' + service.host + ':' + service.port); // this only assigns "socket" variable once, which is kind of good. } }); // This, however, obviously does not work. (no method 'on' for undefined) socket.on('event', function (data) { // do stuff with data. }); Client.js idea 2: undefined

Submitted November 27, 2015 at 05:31AM by zachary87921

How to write a P2P chat app in Node.js by Mathias Buus

http://ift.tt/1Id3FUp

Submitted November 27, 2015 at 05:05AM by jstuartmill

Why we stopped vendoring our npm dependencies

http://ift.tt/1T8n894

Submitted November 26, 2015 at 09:14PM by sk1zy

Why does the express app starts the server using http instead of express

If it's a stupid question, let me know. It's possible I have the concept wrong.So I was reading a book, and it starts the app something like thisapp = require('express')();app.listen(port);Now I generated the express app and in bin/www, it uses http to create server and start listening.I thought a framework was used to hide away all this low level http stuff (among other things).Any reason it uses http core module rather than express' listen function (which, obviously, under the hood would use http)?

Submitted November 26, 2015 at 07:06PM by siamthailand

How many requests/second can a standard node server handle?

I realize the answer depends on many things, but I'm looking for approx. how many requests/second a vanilla installation of node.js on a standard, $5 digital ocean server (512mb ram) can handle?I'm setting up a node server as an API endpoint and would like to have a better grip on how much traffic it can handle.Thanks and Happy Thanksgiving (to US people)!

Submitted November 26, 2015 at 07:17PM by asd821

Have you encountered errors like this before in a Node + Express + AWS Beanstalk + Dynamo app?

http://ift.tt/1IcFOEo

Submitted November 26, 2015 at 01:18PM by behrangsa

Node.js signing and verifying log files digitally using OpenSSL (Offering 400 reputation point as bounty)

http://ift.tt/1I71IbU

Submitted November 26, 2015 at 12:28PM by laraveling

Understanding garbage collection and hunting memory leaks in Node.js

http://ift.tt/1LQoiUR

Submitted November 26, 2015 at 12:46PM by scepticguy

Where does the require function come from?

Hey everyone,I was wondering where the require function comes from. So, is it a nodejs function? Or is it defined in a newer javascript standard? I couldn't find any information on that, hopefully someone over here is able to help.

Submitted November 26, 2015 at 08:54AM by jonaso95

Could I get an example of using fs.readfile that actually sends out the data taken from the file?

I've got the syntax and the callback, but every stinkin example on the interweb reads the data and then console.log... which is exactly where my problem is.

Submitted November 26, 2015 at 08:12AM by monsto

Wednesday 25 November 2015

What's my best option for hosting a private npm registry on my own VM?

I'd like to ideally use ldap to configure access, but provided i proxy through apache (as I likely will), i can hopefully handle that at the web server level. (Side note- if i used authtype basic on a npm proxy server, would npm request my credentials?)Basically looking for npm but behind a firewall, over the WAN. What's worked best for you?

Submitted November 26, 2015 at 04:50AM by SomeRandomBuddy

Directory structure of Node project & where to put socket listeners/actions on server side

New to Node. Started a new project with npm using express, jade and added socket.ioNPM created a directory structure as such:/project|- bin|----www <- this is the main start file with server in it|- node_modules|- public|- routes|---- index.js|- views|---- index.jadeapp.js <-- routes to /routes dir filesNow I've more or less figures out the flow and where what goes. However, in including socket.io, I'm not fully appreciating where a few things should go conceptually, nor how data gets passed around with require()So www instantiates the server, requires app.js, which requires the files in /routes (index.js) which routes to the appropriate jade file.So two questions: 1) Where logically should I place my socket.io server-side listeners? Assuming there will be a io.on('connection'..., this should probably go in the www (server) file, but where should my io.on('whatever message'... listeners go? It would make sense that I put them where they'll logically be listening to the sockets from the respective routed files (either app.js or index.js?). Which leads into my second question: 2) To instantiate socket.io, I need to use this code: var io = require('socket.io').listen(server); Where server is now defined in my www file. Suppose I want to define this io in another file, say app.js, how do I pass the 'server' variable up to app.js which is imported with require() into www?Thanks.

Submitted November 26, 2015 at 04:11AM by oldmanandthebanker

Get the folder a function was called in from command line.

I am trying to create a variable which has the path to the folder I am currently using in command line. process.cwd() seems to give me the folder the file is in, not the folder I have cd to. process.env.PWD works on my linux machine, but not on windows.Basic folder structure for the project: root <- holds the node folders * Sub Folder A ** Sub Folder B ** Sub Folder CThe sub folders are local site installs. I'd like to navigate to the subfolders (and any of their sub folders) and perform various tasks like moving/deleting files, using functions held in the JS file in root.

Submitted November 25, 2015 at 10:11PM by doomwaxer

Node-Chat, a not-so-simple chat with admin features - v1.0.0

http://ift.tt/1MYcGNA

Submitted November 25, 2015 at 06:40PM by IgorAntun

When working on the server side of a website with node.js do you actually work with a DOM or is it just more of the same php-style templating: find and replace strings, concatenate strings, echo variables in the midst of html, etc?

In the past I've tried using PHP's DOM features to build layouts instead of the typical soup of php+html or find/replace placeholders in an html template file. But it always seemed to take longer and I'd read many posts saying php's DOM stuff is a memory hog.My use case is not a massive complex application that someone is paying money for. I'm just interested in using node to do quick and easy and simple things that I would normally use php for. And since I use php to generate web pages. I think I'd prefer to just use JS with node and utilize the DOM instead of a bunch of string manipulation, if it is actually wise to do so with node.

Submitted November 25, 2015 at 06:20PM by thinsoldier

Fetching Twitter Trends by places in Node.js

http://ift.tt/1LxNoUX

Submitted November 25, 2015 at 02:52PM by dynamicallytyped

V8 decides to optimize at 18436 iterations

http://ift.tt/1HmXf4Z

Submitted November 25, 2015 at 03:13PM by a0viedo

Is there a good control panel to deploy Node.js apps?

Hi,I'm looking for a server control panel that supports Node.js. I'm using CentOS 6 right now. I have a VPS server right now, so I'm looking for an "in-house" solution here.I used to host PHP applications on cPanel and Sentora, but they don't support Node.js officially, so I'm looking for a solution.I installed a panel called Ajenti, but It's very challenging to configure nameservers and stuff. I don't want to do everything manually.MySQL, ftp and mail modules are a plus, but I can install them seperately.Is there any server control panel like this?

Submitted November 25, 2015 at 10:58AM by laraveling

Is MeteorJS Production-Ready? Our first-hand experience.

http://ift.tt/1PxFd0R

Submitted November 25, 2015 at 07:59AM by zipboard

Tuesday 24 November 2015

Need to access dokku from new computer...

Alternatively I need to edit a few links on my dokku hosted website( next time I'm using Heroku ) , is their an easy way to do this ?

Submitted November 25, 2015 at 05:22AM by bsou1

The Deveconomics team launched their latest developer survey. Take their survey & win cool prizes!

http://ift.tt/1MQ5Tph

Submitted November 25, 2015 at 01:02AM by manticora134

Questions About Cache and React in Node.JS

As I move forward learning Node and the technologies surrounding it, I am becoming more and more lost regarding what to do "next."I plan to create a very basic social network simply for the purpose of learning the technologies involved in creating something such as this.Most Recent SiteMy most recent site is fairly simplistic. The common pattern is a user visits the route, Node uses MySQL to draw data from the database [1]. The data drawn out is inserted into a Jade template [2] and the Jade template is rendered and sent back to the client. This pattern can be seen at http://ift.tt/1Nrdpgb the user wants to submit an issue, the page must be refreshed [3]. I have no done anything with dynamic reloading or AJAX.The IssueThis is where the problem comes in. I could create a simplistic social network using the same method as described above, but I know there are better ways to create sites such as these and I am having trouble choosing which path to take going forward.[1] Recently I have heard about caching on the server side, though I know close to nothing about it. Instead of drawing from the database I would like to use a cache of some sort, and if it is not in the cache, then draw from the database and possibly add it to the cache. I do not know where to get started learning and do not know if the patterns I am thinking about are idiomatic. Is cache like this just on the server side or is there a similar pattern for use on the client side?[2] Should I be using something more than this to allow for dynamic UIs (such as a simplistic chat in my next site)? I have heard a lot about React paired with Flux and this seems like a good choice. Are there any good tutorials for React and Flux and pairing it with Node? Should I render on the client or the server, and what even is rendering on the server if React is a front-end tool?[3] This issue also melds with the previous. Do I use AJAX or socket.io or something else? Does this integrate with the Flux architecture?TLDR: I have learned the "basics" of Node, Passport, MySQL, Express, etc and have no clue where to go "next." "Next" seems like a step off a huge cliff and I have no idea where to startAny tips, advice, patterns, resources, things to google, etc, are appreciated. Thank you all!

Submitted November 24, 2015 at 11:32PM by MysteryForumGuy

Build an App with Vue.js: From Authentication to Calling an API --> decent UI work for the node-style JS dev

http://ift.tt/1kZIZ7B

Submitted November 24, 2015 at 11:35PM by eljefederodeodeljefe

Is there any guides for setting up JSON Web Token Auth with MySQL?

Everything I am finding is using MongoDB.I would like to set up the JsonWebToken module with mySQL. I am using Angular / Express.

Submitted November 24, 2015 at 09:41PM by An_Unknown_Number

[selenium] open incognito tab for test

yo i wanna open an incognito tab for this test so i can log into two social networking accounts easily.anyone know how i can do this?

Submitted November 24, 2015 at 08:57PM by SpookySkeleton6969

I've been asked to rename my "node_modules" folder for a new project. Is this a good idea?

Everything seems to expect node modules to exist in "./node_modules/", so I'm not sure if renaming it is useful.Thank you in advance.

Submitted November 24, 2015 at 08:52PM by IronOhki

Securing Your Node.js App

http://ift.tt/1QG7eVE

Submitted November 24, 2015 at 08:36PM by ScottWRobinson

having a problem with fs.readfile in nwjs.

I'm embarrassed to shit to even be asking about this, it's about as dog-ass simple kindergarten coder as you can get.I want to open a file into a container. Array, object, I don't care. But right now it's in a 2d array.http://ift.tt/1MPsVwI It probably won't run there, as it's the part of a nwjs bit I'm working on.in the app, I've successfully read the file and parsed it. Then I split it to lines. Then split the lines to fields (tab delimited + empties).however, every example I can find gives the syntax of fs.readfile then proceeds to do nothing but console.log the data and forget it. They do nothing practical with the data.My problem is how do I actually use that data? I've read the file, and put it in containers, and it logs fine when inside the scope of the fs.readfile action. But the data doesn't survive the destruction of the fs.readfile scope.In that fiddle, lines 27-31 are undefined. when I put them inside of the fs.readfile(), they show the expected data but the return doesn't work.How do I get the data out?

Submitted November 24, 2015 at 07:16PM by monsto

Web Authentication Methods Explained

http://ift.tt/1NpXgYf

Submitted November 24, 2015 at 06:32PM by gergelyke

Understanding parameters to anonymous callback functions

Reddit,Getting up the curve on Node.js and trying wrap my head around anonymous callback functions. I understand conceptually how they work and when to use them, but not syntactically.I'm going to use snippets of the default chat app at Cloud9 which I'm trying to understand.My question is - how do you know the # and order of parameters to include in an anonymous callback function for the parent function?For example:messages.forEach(function (data) { socket.emit('message', data); }); It seems to me here that the '.forEach' passes each item of the array as 'data' into our anon callback fn, and then our anonymous function does something with 'data'. Why is there only one parameter to our anonymous function?If I look at MDN (http://ift.tt/15Q6Ehi) for a description of forEach, it seems that the callback should have three parameters (currentValue, index, array). So why does this code snippet only need one? If the answer is 'you didn't need nor include the second two so they were ignored', then why does this snippet of code note work:messages.forEach(function (data,index) { socket.emit('message', index); }); Similarly, the snippet below as part of socket.io: socket.get('name', function (err, name) { var data = { name: name, text: text }; Is it correct if I say: socket waits around until it ".get"s something, and if that something is a 'name', it takes that something and passes it to the anonymous function which has parameters 'err' and 'name'. How did we know to make our anonymous function have two parameters and that the first will be the error returned (if any) and the second will be the value of the something (in this case, the name)? Is there documentation somewhere for socket.get which states its anonymous callback function should always have these two parameters? If that's the case, I'm having trouble finding it.I guess my overarching question is that, as I read more code that others have written, anonymous callback functions seemingly have an arbitrary number of parameters, with seemingly random names and orders. For example, why not (name, err) in the above... why is err first?Thanks in advance.

Submitted November 24, 2015 at 06:06PM by oldmanandthebanker

To commit or not commit NPM deps?

My company is pushing me to start committing our NPM deps to our project's git repo. I strongly dislike this idea for many reasons but there's one point I can't argue:While we can control which specific versions we list as dependencies, those libraries can still be generic as to the versions they depend on. They see no possible way for us to guarantee that everyone has the exact same version of every library, all the way down the tree.Apparently some build failed because of an issue with a new minor version of a deep dependency.Is there any solution to this? Committing our deps feels dirty.

Submitted November 24, 2015 at 05:24PM by nolikeycommitdeps

How to use Gulp with Browserify to build JavaScript bundles?

I want to use Gulp to build bundles of JavaScript files.For example I have the following JS files in my project (numbers indicate dependency priority)// A npm module// A npm module// A npm moduleI want gulp to process this source file and create a final distribution file (bundle) ensuring that all dependencies (includes) are merged together in the right order in a single file so I can include it my HTML and all dependencies will be available to it.How do I specify dependencies in my source bundle files? How do I build distribution?

Submitted November 24, 2015 at 04:41PM by AmirStar90

Using the file system fs.* w/ Node.js

http://ift.tt/1PLoAjQ

Submitted November 24, 2015 at 04:17PM by jstuartmill

30 LOC lightweight alternative to colors.js / Chalk

http://git.io/clor

Submitted November 24, 2015 at 02:48PM by bucaran

Migrating to Node 4.x at Auth0

http://ift.tt/1MHQF4L

Submitted November 24, 2015 at 02:08PM by dynamicallytyped

npm-check-engines

http://ift.tt/1I88n5I

Submitted November 24, 2015 at 12:25PM by jgillich

CodeceptJS - a new end to end testing framework with nice synchonous API

http://ift.tt/1ShaKUn

Submitted November 24, 2015 at 10:31AM by davertua

Node.JS Is Stupid And If You Use It So Are You

https://www.youtube.com/watch?v=1e1zzna-dNw

Submitted November 24, 2015 at 09:26AM by realtalkintech

weblog.sh: A node-based commandline blogging tool (xpost /r/programming)

https://weblog.sh/

Submitted November 24, 2015 at 08:45AM by capitalsigma

Monday 23 November 2015

Node.js 1.7 gb limit

Hi,I'm not sure whether I understand it correct or not, decided to ask here.It saysCurrently, by default v8 has a memory limit of 512MB on 32-bit systems, and 1.4GB on 64-bit systems. The limit can be raised by setting --max_old_space_size to a maximum of ~1024 (~1 GB) (32-bit) and ~4096 (~4GB) (64-bit), but it is recommended that you split your single process into several workers if you are hitting memory limits.here http://ift.tt/1Oda0QL'm going to run my node app on a server and it has 16 gb ram. I'll install pm2 (http://ift.tt/ZYh2lk) to utilize all CPU's.Do I need to do something additional?

Submitted November 24, 2015 at 05:01AM by laraveling

WordPress.com Gets a New Face and Joins the JavaScript Age - #NodeJs

http://ift.tt/1NMv10d

Submitted November 24, 2015 at 04:20AM by p_irish

Concat JS/CSS Dependencies and Inject into HTML.

I'm looking for Gulp.js solution to inject node_module dependencies into HTML and concatenate them in the "right" order based on build type.

Submitted November 24, 2015 at 12:52AM by AmirStar90

The Story Behind the New WordPress.com

http://ift.tt/1jghe9N

Submitted November 24, 2015 at 12:06AM by trout_fucker

WordPress is moving to Node.js - Dance to calypso

http://ift.tt/1NLvIa3

Submitted November 23, 2015 at 10:15PM by Aurelsicoko

Node.js for Embedded Systems

http://ift.tt/1QvLYRA

Submitted November 23, 2015 at 09:41PM by GuidoPike

The biggest, badest, bestest, debugging article and hoopla ever

http://ift.tt/SB8RRk

Submitted November 23, 2015 at 09:45PM by TheOneRavenous

Automate running Grunt Tasks using Distelli

http://ift.tt/1LwtlGb

Submitted November 23, 2015 at 09:48PM by zackgchase

Introducing The New WordPress.com

http://ift.tt/1Oo5lK1

Submitted November 23, 2015 at 09:01PM by kostarelo

Express based boilerplate

I'm looking at Express (+ Node + MongoDB) for a possible candidate to replace the current structure of an (unfinished) project of mine.The different pieces (Express modules) seem to be able to fit my needs, but I was wondering if there is some project/boilerplate I could use as a base/starting point. Please note that I'm not looking for a framework (be it Derby, MEAN, Koa or others). I want to stay with the basics because the main reason of the rewrite itself is because the framework I am/was using is getting slowly abandoned.My basic needs are:Device detection (via UA, different layouts/templates would be rendered for each type of device)Multilanguage support / language detectionLogin/logout using custom user data and 3rd party services (Facebook, Twitter, etc...)

Submitted November 23, 2015 at 08:29PM by alexandernst

Simple multiplayer

I'm trying to make a multiplayer game that ultimately is just a player pressing a or b, then waiting on his opponent to respond with a or b. (It is prisoner's dilemma if you are familiar with game theory. If not not important.)Basically I what I think I need is a server to hold a representation of state; has player A joined (no:yes), has player B joined (no:yes) and have a simple page that allows visualization of the game state (no players joined, 1 player or both players ready). Does that make sense? If so, are three any guides you would could point me towards to help me out?I posted this here as well.

Submitted November 23, 2015 at 06:37PM by azmauldin

made a twitter bot @browningbot

Follow it for a response.Made it using Dan Shiffman's tutorials on YouTube.

Submitted November 23, 2015 at 06:25PM by shurjoiftekhar

State of Native (mobile and desktop) applications.

I have been reading up on several solutions for Native NodeJS applications, but have yet to find a great comparison of all heavy hitters…I was going to head down the path of writing a simple (installable) Native application using the available toolsets.I am looking for 2 things: tools I am missing and/or someone else who has done the work already.The list:Cross Platform (defined as mobile and desktop solution)Adobe AirDesktop:ElectronNWJSMobileCordovaPhoneGameReactNative

Submitted November 23, 2015 at 06:06PM by tbremer

Massive Memory Gains in Node.js 4.2

http://ift.tt/1XlBXGC

Submitted November 23, 2015 at 03:33PM by GoldFire33

Understanding process.nextTick()

http://ift.tt/1kPY2RT

Submitted November 23, 2015 at 03:19PM by jstuartmill

npm in 4.2 LTS

Just wondering are people treating the npm version 2.14.7 that is bundled with node 4.2 LTS as part of the LTS or updating it to v3 and just treating it as another normal dependency.

Submitted November 23, 2015 at 10:35AM by galway_man

Sunday 22 November 2015

Looking for modules to save & sign access logs

Hi.Due to data retention laws in our country, our company is obligated to keep access logs (when, who, which) for a period of time and I'm looking for a module to achieve that using Node.jsI have a PHP application running on a CentOS server (Sentora panel is installed) and I normally handle this by accessing access_logs, but Node.js platform seems to offer more, so I thought I can handle it using Node.jsI need to be able to create a simple log that contains:ip addressrequested url (which page is accessed by user?)access dateI also need a module to "sign" these logs digitally to be able to provide their integrity. (So they can be checked using a private key) I've followed the tutorial below to make it work with my server for a few months ago, but since I stopped using PHP and moved to Node platform, I can use a Node.js package for that, too.(It's written in Turkish, but I think you'll understand what I'm trying to accomplish if you check it out) http://ift.tt/1YoVcS0 keep it short : I need to keep daily access logs (this seems easy if I use morgan) and sign them digitally.I think I'll be able to pull it off with your help.Thank you.

Submitted November 23, 2015 at 06:58AM by laraveling

NPM Installing unwanted packages?

I was looking for help about a file watching package the other night and followed some instructions to update node to v5.0 and install an in-development package using the latest node stuff. Ever since I did this whenever I use npm to install new packages they come with a bunch that I didn't ask for. For example, just now I installed yargs and also got: align-text camel-case cliui decamelize kind-of lazy-cache longest repeat-string right-align window-size wordwrapHas it been doing this all along and I just never noticed it before? I've reverted back to 4.2.2 but it doesn't seems to help. I'm using OS X El Capitan and npm v3.4.1 if that helps.

Submitted November 23, 2015 at 02:25AM by mancusod3

What are the pros and cons of this sort of API architecture?

I have an API that I would like to create using Express. It will contain a couple of layers: authentication, cache, database access.I want to make the most out of middleware and decouple my code with something along the lines of:app.get('/product/:id', authMiddleware, cacheMiddleware, productController.getProduct); Where the cacheMiddleware will return the data from cache or call the next middleware if there is a cache miss. I feel this will make unit testing each component a lot easier. Is this a common pattern? And what are some cons of this pattern?

Submitted November 22, 2015 at 11:15PM by SquattingWalrus

Help with Process.stdin Event Listening

Hello, I have limited knowledge on coding with node.js, and am wondering if it is possible to "listen for nothing"... I am not sure how else to put it. I will explain my situation- So right now I am trying to program the AR2 Drone with the node.js library. I have listener code set up to listen for continuous keypresses of WASD, moving the drone accordingly (used the following: http://ift.tt/1jeSXRh Response from Peter Lyon using keypress module) However, I cannot figure out how to do the following: when the keys are released/nothing is being pressed, the drone stays in a hovering state. My janky infinite while loops did not work, and right now I can only make it that you press a key and then it hovers. Is it possible to set a new listener that listens for.. no events I guess? I mean -> if no key pressed, drone stay hovering. Am I missing any function that could easily simplify this? If necessary, I post my code of the keypress listener I set up, but its a bit long

Submitted November 22, 2015 at 10:47PM by bluereborn

Why do we use forever/pm2 with cronjob/crontab(s) can do the job better?

When I started my node project I was asking myself this question. When I went to launch my project I realized I had an issue with my socket implementation of phantomjs (specifically phantom-node). As it turned out it was just my settings.Now I am running under LaunchD (OSX updated version of cronjob/crontab) its much-much faster and less child processes.Since this is only my 3rd major attempt at a middle sized project why these tools are not as widely touted? Or was my research too narrow?

Submitted November 22, 2015 at 09:34PM by bigorangemachine

Handling Segfaults?

Hey,i have an APP that is a mix of everything. Database, tcp sockets and a lot more, and every now and then my app crashes with an SEGFAULT. Luckily my app is nothing that has interaction with users so its not really a crucial problem since it auto-restarts, but still i'd like this fixed.Im on node 5.1.0, and am using the following startup parameters:--nouse-idle-notification --max-old-space-size=4096 I hope somebody here can help me.

Submitted November 22, 2015 at 06:02PM by kinsi55

Ultrapush.ws - Backend-less client notifications

Hello, I created this over the past few weeks and I would like some feedback. Ultrapush converts Webhooks to Web Sockets. Would you use it?Thank youhttp://ultrapush.ws

Submitted November 22, 2015 at 04:15PM by kostarelo

Write "Synchronous" Node.js Code with ES6 Generators

http://ift.tt/1kOAq06

Submitted November 22, 2015 at 01:59PM by jstuartmill

Introduction to Load Balancing Using Node.js

http://ift.tt/1kOAq05

Submitted November 22, 2015 at 01:59PM by jstuartmill

Saturday 21 November 2015

Any one else using JmesPath? Whats your experience?

http://ift.tt/1QWRmNM

Submitted November 22, 2015 at 07:13AM by Piercey4

How do I use database functions across different files? (Express/Knex)

I'm using functions written to Knex to handle my database calls. I was using one file, but I split the files into separate routes. Now I'm not sure how to use those functions in the routes.Any help please?

Submitted November 22, 2015 at 01:14AM by scottcfr

I created the BEST NodeJS non-MVC framework!

http://ift.tt/21aSZfo

Submitted November 21, 2015 at 11:47PM by crh3675

Here's a Node Event Emitters tutorial I put together. Hope you guys enjoy

http://ift.tt/1XhemXy

Submitted November 21, 2015 at 07:46PM by dlombardi

Request for code review: Very simple Kafka producer service in coffee (< 100 lines)

Hey guysI decided to get more familiar with Nodejs for the fun of it. So far my dealings with node have mostly been tinkering a few lines here and there in existing services.I create a new stand-alone service that lets you produce messages to Kafka topic from STDIN. Can you guys please give ma a quick code review. Don't hold yourselves back in the slightest. I want to know everything from best practices to what I could have done better.http://ift.tt/1kNTnQi

Submitted November 21, 2015 at 07:10PM by Pelmeen

Learn How to Build a Lighting-Fast App with Node.js

http://ift.tt/1MJ4HEb

Submitted November 21, 2015 at 05:21PM by SamAndreas

Source code for http://ift.tt/1KKqJte

http://ift.tt/1HVVkyw

Submitted November 21, 2015 at 05:03PM by bookerio

(X-post) Webstorm does not recognize NodeJS writeHead()

Title says it all, for some reason Webstorm editor does not recognize writeHead() in my code. http://ift.tt/219W6Ep, Node.js core libraries are enabled. http://ift.tt/1NIpxn1 looked at a couple of tutorials and they have "Node.js Globals" checkbox checked http://ift.tt/1jcKiPx, is this what am I missing? How to solve this problem?

Submitted November 21, 2015 at 02:59PM by KT2013

How to Run PM2 with Distelli

http://ift.tt/1N2MncT

Submitted November 21, 2015 at 02:45PM by jstuartmill

To what extent should we use ES6 features in our node modules?

Now that the stable version of Node has moved to 4.2, we can use ES6 features like classes and generators and plenty of other stuff in our node modules.However to add them would mean excluding people using older versions of node. What proportion of users do we think have moved to the LTS version (4.2)? Might it affect the popularity of a module to limit it to a node version like this?

Submitted November 21, 2015 at 02:09PM by TMiguelT

Friday 20 November 2015

What to choose for writing an analogue of Twitter?

I learning node & mongoDB and want to build an analogue of Twitter for practice. What technologies should I use ? Does anyone saw the similar tutorials ?

Submitted November 21, 2015 at 07:23AM by _melchior_

node-glob selective termination

I want to glob across my file-system finding matches of say "node_modules" folder but not proceed further into the subtree of found folder. Basically I want to find only top level node_modules foldersI looked into the node-glob library and I can see that it exposes events and methods to control the search but no one to say something like stop processing this entry or so.Is there any way to do this?

Submitted November 20, 2015 at 09:49PM by aragorn_ranger

Build a Fullstack Application With Angular.js, Express.js, and User Management in 15 Minutes (cross post from /r/programming)

http://ift.tt/1X3afDQ

Submitted November 20, 2015 at 09:16PM by robertojd

How can I get started with unit testing?

I have written a few small projects using Node which just work. While working on those projects I felt that it would be very hard to maintain a project without unit tests if it grows bigger, thus I decided to learn unit testing. As you might have guessed I am new to it, how can I get started with unit testing?

Submitted November 20, 2015 at 05:16PM by segmentationfaulter

Scaffold out a node module with Babel, tape, coveralls and npm scripts

http://git.io/rise

Submitted November 20, 2015 at 04:19PM by bucaran

Raspberry, Arch Linux, NodeJS and the LED

http://ift.tt/1I3K8jS

Submitted November 20, 2015 at 03:29PM by jstuartmill

Easy profiling for Node.js Applications

http://ift.tt/1OVqK0n

Submitted November 20, 2015 at 03:26PM by jstuartmill

Creating addon in nodejs

http://ift.tt/1I1skv9

Submitted November 20, 2015 at 03:26PM by jstuartmill

3 ways to install the latest Node.js version on a Mac

http://ift.tt/1YjRp8C

Submitted November 20, 2015 at 09:30AM by bytearcher

Thursday 19 November 2015

bugger - chrome devtools agents for node

http://ift.tt/1MFAGVP

Submitted November 20, 2015 at 04:29AM by jkrems

popular Node.js articles

http://ift.tt/1PfOxbd

Submitted November 19, 2015 at 11:29PM by itsawesomeday

Node.js + request + for loop : Runs twice (Help)

http://ift.tt/1MXMWQH

Submitted November 19, 2015 at 10:51PM by laraveling

Building an app that polls a website

Im looking to build a web app using Node.js that is going to be used to poll a website continuously to see if the website is still up, and to determine how long it takes for the website to respond to a given request. Is it a good idea to simply use Express for this purpose? What are some mechanisms within Node.js that enable me to set an interval for polling, lets say I want to hit this specific site every 5 seconds.

Submitted November 19, 2015 at 09:18PM by FutureIsMine

Any info on letsencrypt?

Hi all was wanting see if anyone has dealt with this new certificate authority. Looking for some certificates and was given a link to http://ift.tt/1Hfe2Dy just curious if anyone has feedback on the company.

Submitted November 19, 2015 at 07:57PM by TheOneRavenous

help with requiring and calling local file

I'm having trouble with linking in a local file to my app - my file is called algorithm.js and inside isvar algorithm = function(){ var test = function(){ console.log("test"); } } module.exports = algorithm; in my app I havevar algorithm = require('./algorithm.js'); algorithm.test(); and I'm getting back "algorithm.test is not a function"

Submitted November 19, 2015 at 07:45PM by wheyisbae

Using Socket.io to create a cross domain chat application

Hello! I am having a bit of a problem finding resources to answer my question and i am hoping you can help me out. I am trying to create a chat application similar to Olark, or Intercom, in which the user can be on any website and they chat into a support interface that I host. All of the documentation and examples I have found list scenarios where the user is on a single hosted domain and they are chatting into a room of users on that same domain.Is there any documentation, resources or examples of people using socket.io to chat across domains?

Submitted November 19, 2015 at 06:53PM by BarryAlanArkin

Excel Frameworks

Hi(noob here),I got a job at a company that is helping me learn how to become a developer and I am taking things one step at a time. We are interested in building a service that takes csv data and can build excel sheets that can be served to another url. Does this make sense? Am I just babbling? Please help with a little guidance.Thank you

Submitted November 19, 2015 at 06:24PM by Macaframa

Importing Module Not Working From Different Folder

I've made a module in a folder. I created a test.js file in that same folder and required the module..var DB = require('./Actions'); to test the module out and it works. I then implemented the module in a different folder with the exact same test code..var DB = require('../../../Database/Actions'); And it throws a module-specific error.What reasons could there be? Permissions? I was going to link to the repo but it's on a private git since it's for work. What other information would be needed to assist? Not sure what I can show that would help without seeing the rest of the code.

Submitted November 19, 2015 at 05:59PM by natdm

Should uninstall 0.12.2 node before installing node 5? Also, will my stuff break if I update?

No text found

Submitted November 19, 2015 at 05:22PM by JonFrost

What the web platform can learn from Node.js

http://ift.tt/1O2FLMj

Submitted November 19, 2015 at 04:31PM by kannonboy

Run CPU-consuming Gulp tasks in the separate processes to achieve faster builds.

http://ift.tt/215wng8

Submitted November 19, 2015 at 04:37PM by inikulin

BuiltWithMeteor - Discover products and startups built with Meteor.js

http://ift.tt/1QKrSTQ

Submitted November 19, 2015 at 03:26PM by bogdancloud

Node.js beginner: Help creating an application that allows a User to download a +50GB Feed

I have been tasked with building a Node.js application that allows Users to download our complete data feed, which is approx. 50GB and is usually downloaded through curl, however they may test the calls in their browser (by specifying a limit). The data currently sits inside of a MySQL database, therefore I am using the node-mysql package. As soon as I make a request to the database and get 1 row, I write the data to the response.The Node application is running on a machine with 2 cores, 4GB RAM and 10GB of disk space. However, everytime I try to download the feed, the amount of Memory hikes up (monitored through pm2) and I get a curl: (18) error (A file transfer was shorter or larger than expected.). I've tried setting the header for Chunked Transfer Encoding.Can anyone share any light as to why I'm facing this problem? I'm using Node with Express to easily fulfil requests through the browser.Thanks in advance.

Submitted November 19, 2015 at 09:47AM by 01zombie01

Wednesday 18 November 2015

Can you make `require` itself an ES7 Async function?

I'm using ES7 Async/await Babel and it seems I have to do everything in an async function if I have to use awaitmain.jsvar fnA = require('./a.js'); async function main(){ var val = await fnA(); // do something with val } a.jsmodule.exports = async function fnA(){ return await somePromise(); } Wouldn't it be much better to have something like this:main.jsvar val = await require('./a.js') // do something with val a.jsmodule.exports = await somePromise(); I tried to write a require patch so that it can encapsulate the contents of the new file in an async function.__require = require; require = function require_async_patch() { var args = arguments; async function async_require_patch() { return __require(...args); } var prom = async_require_patch(); // prom: Promise { // _bitField: 33554432, // _fulfillmentHandler0: undefined, // _rejectionHandler0: 1, // <- this seems to be module.exports // _promise0: undefined, // _receiver0: undefined } return prom._rejectionHandler0 // todo: await prom } I haven't completely thought it through but even before I tried to go forward with this, it turns out Babel doesn't like await unless its inside an async function. It doesn't care if the parent require is patched to be an async function, it needs the asyn function in current visible context.Any workarounds? or am I chasing the wrong things?

Submitted November 19, 2015 at 07:21AM by laggingreflex

Confused about architecting my next web/mobile app

Warning, wall of text.I've started a personal project which involves building a website that has user login/registration (including a backend where users will be able to do something) and an app that will enable the user to do almost the same (but it will be a native app), plus call a few other APIs.Now, the website itself will have a few static pages (i.e. home, FAQ, About, Features, etc). The main focus will be on the backend - in other words, the interface once the user logs in.This is my first time building a Node.js app (have been a front-end dev for a while) and it seems very simple. The last time I was working on backend it was with PHP (during 5.2.x days) and ASP.NET MVC 4. So, it's been some time, but not too long for me to forget all the basic concepts and principles.The way I envisioned this website to work is to have everything served by Node (jade templates, including the user's backend, etc). In addition, I will have 4-5 API endpoints that the mobile app will call. In my opinion, the frontend JavaScript required in this case would be minimal - maybe some events and that's all.I've started working on this and it is going alright - I've had some issues. For example, I've been having issues coupling passport-local and Json Web Token. I would like to use JWT instead of session ID for authentication, but I'm having issues making it work.However, the more I've been reading the literature online, the less inclined I am to believe that this is the right approach. It seems that, even with Node, the focus is still heavily on the frontend, whereas the Node is just providing the API endpoints. Whatever example I find seems to be using Angular or Backbone. For example, while looking for a way to get JWT to work, I've found a dozen articles saying "oh, just send an AJAX request via Angular/jQuery/Backbone, obtain the token, and then add the token to the Auth header".I am familiar with Backbone and would be open to learning React and/or Angular. At my workplace, we use Backbone to render web components, and all they do is pull data from an API and then get rendered.I am perfectly fine with this more front-end heavy approach as well - I'm not too deep into the app, so I can scrap it a little bit and restructure it, but I would like your advice on which approach to follow. Focus more on the frontend or the backend? Or have a nice, even split between the two?

Submitted November 19, 2015 at 06:24AM by Deusdies

Best book to properly learn node after Node Beginner Book?

I have recently read the Node Beginner Book and I really like the style that this book was written in. I have looked at the: "Learn node.js completely and with confidence " from javascriptissexy.com and they recommended: "Professional Node.js" but I didn't really like the style of the book as most of the book is just concepts. What other books would you recommend after reading the Node Beginner Book?Thanks

Submitted November 19, 2015 at 02:12AM by mre12345

How does this error work?

I'm getting an error with thiscon.connect(function(err){ if(err){ console.log('Error connecting to Db'); return; } console.log('Connection established'); });

Submitted November 19, 2015 at 01:26AM by AdaliaRosesHead

Smoker Temperature Controller written in Node

Over the last few months, I've been trying to learn more about Node development and beginner's circuitry by developing an automated smoker temperature controller intended to be hosted on a raspberry pi and be controlled via a webpage.Check it out and let me know what you all think!http://ift.tt/1Mnc46i

Submitted November 18, 2015 at 09:24PM by jjohnson338

Node v5.1.0 (Stable)

http://ift.tt/1QLigrY

Submitted November 18, 2015 at 06:58PM by a0viedo

Node.js Beginner Question: How to properly organize api code?

Hi everyone, Java developer here who wants to get into nodejs development. My goal is to create an Restful API which accesses a MySql database and returns values. I have made it work, but all of my code is in server.js currently.How I understand it server.js should only start the server and initialize the application. Is it the right way to encapsulate funcionality in modules?If I think in an object oriented way I would make at least one module which provides the database access and reads the data from the database. Another module which sets the REST routes and handles the requests.Does anybody have a simple example which shows that? All tutorials I find seem to be "How to create a Restful API the quick and dirty way".

Submitted November 18, 2015 at 05:10PM by mikugo

Fixing the issue, willing to pay for it, based on events and mongoose

I’m seeking help with my app, willing to pay someone for the fix. Here's the pastebin file, it's based on the events and it's all working good till the RoundManager panel (on second deposit made it starts to act crazy, calling multiple times, not following the instructions.) http://ift.tt/1NaX2En

Submitted November 18, 2015 at 09:43AM by ImNotAJohnDoe

Tuesday 17 November 2015

Use React with Relay today: Graphql ORM for MongoDB

http://ift.tt/1Mz6Lyu

Submitted November 18, 2015 at 07:29AM by gergelyke

Deploy Anything with Dropship

http://ift.tt/1NarpdQ

Submitted November 18, 2015 at 04:19AM by tophermck

Circular Dependencies in Node.js

http://ift.tt/1MRdBTz

Submitted November 18, 2015 at 01:44AM by jstuartmill

Burglar Alarm With Sending SMS and Email From Your IoT Device

http://ift.tt/1MRdzLs

Submitted November 18, 2015 at 01:45AM by jstuartmill

Top 4 Javascript concepts a Node.js beginner must know

http://ift.tt/1MRdzLr

Submitted November 18, 2015 at 01:46AM by jstuartmill

How to Automate Deployments of Nodejs Applications with NGINX

http://ift.tt/1PMRQFf

Submitted November 17, 2015 at 09:23PM by zackgchase

First time with nodejs, need help

This is my first time with node and I've been struggling with it all day and need your help.So this is what I need,I have a WooCommerce store and I want to access its products using node.This is the module hXXps://www.npmjs.com/package/woocommerce I am using and I've installed all its dependencies.But I don't know what to do from here. I need your help to connect to the store(I have the keys ready) and view product listings. I know this is a lot to ask but I'm really exhausted and out of options.How do I know if an added module is working or no ?

Submitted November 17, 2015 at 08:33PM by nodenooob

I'm trying to make a GroupMe bot. What is a .env local file?

Ive been following this tutorial word for word but as soon as I typed "/cool guy" into the chat, by test-bot didn't respond. I manually had it message the groupMe and that worked but I want to move on and get this to respond to certain text commands. At this step:Open the file .env from your local files in your text editor of choice. Find where it says "YOUR_BOT_ID_HERE" and replace it with the ID of your new bot.Where are my local files? Is it in the folder with the name of my bot?Thanks in advance.

Submitted November 17, 2015 at 07:43PM by fmhall

csurf and helmet

Hey,Currently I use csurf package (CSRF token middleware) for security purposes but recently I stumbled upon with helmet. Is it recommended to use it with csurf or is it a "one or another" choice?Thanks.

Submitted November 17, 2015 at 07:14PM by laraveling

BuiltWith - Discover products, startups and more cool stuff built with Meteor.js

http://ift.tt/1QKrSTQ

Submitted November 17, 2015 at 06:54PM by bogdancloud

Introduction to Testing Node.js [video]

https://www.youtube.com/watch?v=u2XCdkL4bWI

Submitted November 17, 2015 at 06:02PM by jakerella

ContainerShip is a Docker container management system implemented in node

http://ift.tt/1PymzHE

Submitted November 17, 2015 at 05:35PM by philatcontainership

Building command line tools with node.js

http://ift.tt/1Qsu17m

Submitted November 17, 2015 at 04:06PM by RedWolves

Get familiar with the Node.js and build 3 Apps

http://ift.tt/1df03lS

Submitted November 17, 2015 at 01:21PM by codingnight

Debugging your Node.js server code in the browser

http://ift.tt/1O3OWue

Submitted November 17, 2015 at 01:01PM by Posva13

Forever doesn't run Forever (node V4) - Any Updates on the best daemon?

Hey All!I wrote a node script I need it to run in a loop for a very long time until it is completed (on OSX 10.11.1)Initially I tried using a cronjob and would have worked except the sockjs (npm module phantom-node dependancy) always said the permissions were wrong :(I've been trying forever but it only seems to work for a few hours then kicks itself off. I remember reading about another 'forever' (or pm2) that was exclusive to the new release of node but I can't find it now.Is there any suggestions on how to get forever to run better? Should I run another daemon to monitor the forever log file? Is there a better system with the new Nodejs?

Submitted November 17, 2015 at 12:40PM by bigorangemachine

How to create a PUB/SUB system like Meteor with Express or another framework ?

I know there's socket.io, but I can't find examples where it is as ''simple'' as in Meteor. What I mean by that is :The client subscribes to a ''channel'' with custom arguments, and the server sends custom responses to him. With socket.io, the data is generic and not customised per client. I saw some way to create custom publications but I find that it was really not a good idea (sending the parameters in the string of the channel).Basic example :Client subscribes to : My friend's posts (like facebook timeline) or my notifications.Server subscribes to RethinkDB or anything that can give him this information in real time.Server pushes the information back to the client when it receives the data from its subscription.In Meteor, this would be like :Meteor.publish('myNotifications', function () { return Notifications.find({userId: this.userId}); }); Meteor.subscribe('myNotifications');

Submitted November 16, 2015 at 06:34PM by skini26

Jade whitespace question

Is there any way of outputting markup like this with Jade? (double spaced)
I've had a quick google around on whether or not this would be possible, but haven't found any info on it so far. Any ideas?

Submitted November 16, 2015 at 07:16PM by Spoonzie

Spying on James Bond with Node.js

http://ift.tt/1RYOgqV

Submitted November 16, 2015 at 03:08PM by jstuartmill

Scraping the Web with Node.js

http://ift.tt/1Lh1ABy

Submitted November 16, 2015 at 03:08PM by jstuartmill

Nodejs bans user from github for posting an EGGPLANT emoji

http://ift.tt/1MORuxd

Submitted November 17, 2015 at 05:20AM by woooooooow9

Slides from talk "Decorators & metadata reflection"

http://ift.tt/1l1eLRC

Submitted November 17, 2015 at 03:53AM by ower89

Intern.js Error: connect ECONNREFUSED

What hosting do you recommend?

Hi /r/node! My friend and I are thinking of developing websites together as a business thing using node.js and we aren't sure where would be best to host our stuff. Where do you guys host your personal projects? Where do you host your client's sites? I suppose we could always host our personal portfolio pieces from a home server, but I don't think that's really appropriate for an actual client.Comments would be greatly appreciated! Resources for getting more prepared to do actual business would be great too! Thanks!

Submitted November 17, 2015 at 03:41AM by lewisinc

Node.js and ES6 Instead of Java – A War Story, Part II: The Joy and Pain of Test-driven Development

http://ift.tt/1PKeCxu

Submitted November 16, 2015 at 06:46PM by pahund

Sunday 15 November 2015

gen-readlines: generator based line reader for node

http://ift.tt/1MPKPhM advice it greatly appreciated.

Submitted November 14, 2015 at 03:40PM by qudat

node based ecom platforms

I'm researching potential platforms to develop a simple eCommerce site with.I see there are a few options out there, Reaction Commerce being one that stands out to me the most.Due to the simplicity of the products, and order process, I don't wish to implement any large code bases if possible (magento, drupal commerce, etc)Are any of these polished enough for prime time? I'm talking drop in and run. I have some product customization and cart logic to handle, and want to focus on the business logic of that instead of on the store software.thanks

Submitted November 14, 2015 at 05:16PM by thrownaway21

Common practice request; BabelJS, Heroku

I'm evaluating Heroku, a first timer here. I'm generally fond of transpiling my src using BabelJS, enabling me to future proof (read: use the fun stuff) my projects. Here's my general setup:package.json{ "main": "build/index.js", "engines": { "node": "4.2.2" }, "scripts": { "build": "babel -d build/ src/", "postinstall": "npm run build" }, "dependencies": { ... }, "devDependencies": { "babel-cli": "^6.0.0", ... } } But this will not compile on Heroku as they install for production, as expected. Easily solvable by just moving the dependencies out of dev, or committing my build/ into repo - however, I'd like to avoid both. I do not like having the build in repo, and I do not like having dev-dependencies specified as dependencies.How do you do it?I also realise this is bike-shedding, but it's a pet peeve of mine so I figured I'd ask.

Submitted November 14, 2015 at 11:17PM by fl0w_io

Javascript : Test-Driven Learning

http://ift.tt/1OveN0X

Submitted November 14, 2015 at 06:56PM by martinchavez

S3renity: Easy batch operations for S3 (forEach, map, reduce, filter)

http://ift.tt/1losnHl

Submitted November 14, 2015 at 03:25PM by wellsjohnston

Why is there no Electron/NW.js alternative using Firefox?

Well? It does have a smaller size than Chrome, doesen't it?

Submitted November 14, 2015 at 09:42PM by SapioiT

Best Rendering Engine and Frameworks to use in Node?

I'm progressively learning NodeJS and the express framework. I'm a former PHP developer, and worked with HTML + CSS.I'm having a little difficulty in deciding on a rendering engine. I am using Jade currently, and my front end developer is mostly experienced in static html, css, and javascript.We're trying to move to node applications and the ReactJS library.What is the best rendering engine to use? Is ReactJS a good choice in JavaScript libraries?On a secondary note, what exactly is ReactJS?Thanks, Scott

Submitted November 15, 2015 at 12:12AM by scottcfr

Troll co-workers and friends quickly via simple commands

http://ift.tt/1WSF4Ln

Submitted November 14, 2015 at 07:16PM by ukupat

I am not bad at Javascript, but I find it really hard to follow open source projects on Github, why?

I have been learning Javascript for past six months now and also know the basics of Node like events, streams and buffers etc. I also know the fundamentals of HTTP protocol. I thought with this background I would be able to understand the source code of projects like Express.js and Hapi.js etc, but my experience is contrary to what I assumed. Where am I lacking?

Submitted November 15, 2015 at 09:05AM by segmentationfaulter

Saturday 14 November 2015

Get setup, building, testing, and deploy Node.js Applications in minutes

http://ift.tt/1RUwvZY

Submitted November 13, 2015 at 10:01PM by zackgchase

Suggestions on architecture/ libraries to use to consume an API and store in DB

The app I want to make is a bit more involved but the server side, which I want to start and finish first will do this.Pull data from an OAuth REST Api.Store the raw result into database.Pull data from different Rest Endpoints to get information relating to the first pull, store in database.Pull all this information from the database and store a data structure that is more clear on the data I care about.Create Rest Endpoints exposing this new data.Create some kind of timer that goes through and checks a particular query and notify the user.Essentially this app will allow the user to create a query and the app will notify them when those conditions are met.The last bullet point is a complete unknown to me.I was thinking of using - Node - Typescript - Grunt - SequelizeAs the main stack for the server. Any suggestions for architecture or frameworks I should look into?

Submitted November 13, 2015 at 04:35PM by envinyater

Node.js Giphy API - Promise + Callback support

http://ift.tt/1VoZ9FE

Submitted November 13, 2015 at 04:24PM by austinkelleher

What are the benefits of using ExpressJS versus rolling your own http server customized for your app?

Are there good reasons to use Express instead of customizing a Node http server for your specific app's needs? And what are the drawbacks?

Submitted November 14, 2015 at 03:04AM by kescusay

Are there any good books focusing on core node and upto-date?

Most of the books on Node.js focus on how to create API's and stuff using node without giving much attention to its core. I was looking for a worth-reading and upto-date book which dives deep in Node itself, are there any?

Submitted November 14, 2015 at 08:10AM by segmentationfaulter

Investigating npm 3 perf

http://ift.tt/1iZH5m5

Submitted November 14, 2015 at 08:48AM by binb

Can I use es6 template strings server side?

I want to have a template file like ./hello.html and render it using es6 template strings.I can't find any tutorials on this. Everything seems to revolve around client side.

Submitted November 14, 2015 at 05:57AM by xintox2

Feedback on good path to properly learn node.js and express?

Hello All, I have decided that I want to properly learn node.js. I have 2 project ideas in mind one is a single page app (which will take advantage of real time data) and the other one is a multi page app (similar to an Ecommerce website). I have been searching through the net to find the best resources to learn node.js properly and came across the books: Node.js in Action and Web Development with Node and Express.Do you think that a good path to learn how to make basic projects in node.js would be:Node Beginner Book -> Node.js in action -> Web Development with Node and ExpressWhat are your thoughts on this path? Thanks

Submitted November 14, 2015 at 04:14AM by mre12345

Is ExpressJS still an active project?

I noticed that the last commit to Express was over 3 months ago http://ift.tt/1Msy3qo in master and even later for the 5.* branches. Is it still an active and recommended project? I'm looking into using it.The issue tracker looks active but mostly tagging things for a 5.x release for well in the future. And there have been many pull requests http://ift.tt/1PrYi6b but nothing been merged in that same period.I suppose the project doesn't need to have commits all the time as it's probably stable and has been around a long time, but just wanted to check that all's well because I would think a project with 5K commits and 20K stars would have at least one commit in the last 3 months.

Submitted November 13, 2015 at 07:28PM by nowboarding

Friday 13 November 2015

Nodejs module that enables you to modify Active Directory groups?

In my nodejs app I would like to be able to modify a user's group membership in Active Directory. For example, "Add Bob to the Athletes group, or "Remove Jane from the employees group". I don't even necessarily need to authenticate my users against AD - I just need to run queries against a Windows Active Directory. Any modules that can do this? I've heard of ldap.js, but I can't tell whether it can do this. Thanks.

Submitted November 12, 2015 at 09:40PM by mikej1224

Getting Ghost to work as Middleware on Node

http://ift.tt/1MqXAjD

Submitted November 13, 2015 at 12:11AM by Darthyogurt

Question about TCP raw-socket programming.

I am trying some basic socket programming in node js. Below is some code to send a TCP SYN packet. It does send the packet, and the target will respond accordingly. I used wireshark to capture the packets, and confirmed that a correct packet was sent and a SYN + ACK or RST + ACK is received. However, the s.on("message", func) never prints anything to the output. I cannot figure out why.var raw = require('raw-socket'); var crypto = require('crypto'); var ip = require('ip'); var s = raw.createSocket({ protocol: raw.Protocol.TCP, generateChecksums: true }); // source port 20 to destination port 80. Packet length 20 with SYN flag set. Other flags are zeroed. var p = new Buffer('0014005000000000000000005002200000000000', 'hex'); // generate four random bytes for the packet sequence. crypto.randomBytes(4).copy(p, 4); //build pseudo TCP header. var genPseudoHeader = function (srcIp, dstIp, tcpPacketLength) { var pseudoHeader = new Buffer(12); pseudoHeader.fill(0); pseudoHeader.writeUIntBE(ip.toLong(srcIp), 0, 4); pseudoHeader.writeUIntBE(ip.toLong(dstIp), 4, 4); pseudoHeader.writeUIntBE(6, 9, 1); pseudoHeader.writeUIntBE(tcpPacketLength, 10, 2); return pseudoHeader; }; // this gets absolutely nothing. s.on('message', function (buffer, address) { console.log("received " + buffer.length + " bytes from " + address + ": " + buffer.toString("hex")); }); // calculate checksum using utility function. var sum = raw.createChecksum(genPseudoHeader('192.168.40.100', '192.168.40.1', p.length), p); // writing checksum to TCP packet. p.writeUIntBE(sum, 16, 2); console.log(p); function afterSend(error, bytes) { if (error) { console.log (error.toString ()); } else { console.log ("sent " + bytes + " bytes"); } } // send packet s.send(p, 0, p.length, "192.168.40.1", function () {}, afterSend);

Submitted November 13, 2015 at 04:43AM by zachary87921

Express.js, bin/www settings and Socket.io (Help)

http://ift.tt/1HLUGns

Submitted November 13, 2015 at 07:14AM by laraveling

Node.js Streams3 Class Diagram

http://ift.tt/1AuUlB3

Submitted November 13, 2015 at 07:17AM by eljefederodeodeljefe

Build a Data Mining Automation Bot Using Node.js & Your Browser

http://ift.tt/1N0Hy5I

Submitted November 13, 2015 at 06:16AM by SHIGGA

Thursday 12 November 2015

Modules - Developer Center - Joyent

http://ift.tt/1M9xcga

Submitted November 12, 2015 at 04:23PM by outlearn

Node Summit: Architecting Production - Developer Center - Joyent

http://ift.tt/1MDq65b

Submitted November 12, 2015 at 02:27PM by outlearn

Node Summit: Node.js and Containers: Dispatches from the Frontier - Developer Center - Joyent

http://ift.tt/1Y6EruB

Submitted November 12, 2015 at 02:54PM by outlearn

Server side rendering using Serender and Express

http://ift.tt/1ODiFgH

Submitted November 12, 2015 at 11:50AM by YoussefKababe

Node Summit: Industrial-Grade Node.js - Developer Center - Joyent

http://ift.tt/1HOVUU7

Submitted November 12, 2015 at 04:42PM by outlearn

RethinkDB 2.2: atomic changefeeds, parallel scans, improved runtime

http://ift.tt/1WPeItE

Submitted November 12, 2015 at 07:35PM by fistful_of_dollars

Debug

http://ift.tt/1GY0oT5

Submitted November 12, 2015 at 03:52PM by outlearn

How does JxCore compare to Nexe?

I can't find a real comparison of these two technologies and was wondering if someone has expierence with both of them.thanks!

Submitted November 12, 2015 at 05:06PM by twoon

Java Pass The Baton Please aka next generation of software development

http://ift.tt/1lldxRK

Submitted November 12, 2015 at 08:59AM by tudvari