Thursday 31 December 2015

Emojify your commit messages with commemoji (made with Node)

http://ift.tt/1OnNHrm

Submitted January 01, 2016 at 12:15AM by BBQLays

Any luck with node-inspector?

I've been struggling on and off with this issue for a while and I can't find anyone else having this issue. I've outlined the issue here: http://ift.tt/1NVf6zl, node-inspector is broken in Chrome - not allowing me to click in the console, to close the Settings window, and it's not properly breaking at the breakpoint. I get a notice that it's breaking but I can't debug anything.I thought it was a permissions issue and ended up 777ing my bin commands but I'm still not getting this to work. Anyways, thought i'd reach out here.

Submitted December 31, 2015 at 10:49PM by no_spoon

Asynchronous Iterative & Recursive Patterns for Node.js - Part2, recursion involving async work

http://ift.tt/1OwzPgl

Submitted December 31, 2015 at 08:59PM by mostafa-samir

How do I get the header for a redirected URL without the content?

Let's say I have some website http://mysite.com that generates a new URL to redirect to based on the time of day. How can I get that redirect URL without downloading the content of it? Currently I'm using the request library and it works, but it has to download the entire content of the page every time even though I'm not using it.Thanks!

Submitted December 31, 2015 at 03:26PM by CJ-Johnson

1 week ago I started to learn HTML, CSS, Javascript and Node.js. Today I deployed my chat application.

http://ift.tt/1VrQBws

Submitted December 31, 2015 at 01:39PM by lorenzopicoli

Need some help with bodyparser /Parsing post content)

Hello,I am new to node.js never really used it before. So bare with me :)I tried to parse a post from a "register" page. Link: app.js users.jsBut all I get is undefined. It seems like the vars are not set... I read that this could happen if you don´t put "bodyParser" before the rest. But I did... So what did I miss?

Submitted December 31, 2015 at 11:24AM by Unomagan

How to draw every street in a country with Node.js and SVG

http://ift.tt/1ZB3W8c

Submitted December 31, 2015 at 11:06AM by wo1fgang

Best way to do this in Node?

Let's say I have a url in a string x. I know that if requested, that url will redirect to some other url. However, where it redirects is nondeterministic and I have to re-request it every time to get the next redirect url. How do I grab this redirect without downloading the actual web content that it links to? I simply want the url.Thanks!

Submitted December 31, 2015 at 08:15AM by CJ-Johnson

Best way to manage processes (not nide specific).

I want to create a system that monitors system processes. Not for node specific processes.I want to know when a pid dies.

Submitted December 31, 2015 at 08:18AM by xintox2

Wednesday 30 December 2015

Having issues with JWT and Express please help

I posted a question on SO yesterday, but there's no answers yet.My question is here -> http://ift.tt/1TqLb3K want to be able to authenticate someone and issue a JWT token which is easy, but I'm unable to set the headers when I use res.redirect() in express.Please help, this is so frustrating!Here's my code for app.js and index.jsThanks again!

Submitted December 31, 2015 at 02:20AM by bashir26

Making Bots in Node.js?

Hi,I have been playing around with node.js for the last few months mainly making websites with express. I have played around with: http://ift.tt/1PuyL9K and I really want to try and make my own version. (This module logs into steamcommunity.com and artificially sends trade offers) What modules would you recommend I look at?Functionalities that I would need: Log in to website, pressing on divs, scrape certain error messages/success messages. Another thing that I have been asking myself is is this even ethical? Are you allowed to artificially log into a website and perform actions assuming that I don't send too many requests?The modules that I have had a look at so far are: Cheerio and Request. Are there are more that you would recommend ?Thanks!

Submitted December 30, 2015 at 11:41PM by mre12345

Help making a button to fire another node script.

I have built a working node.js script that will connect to a machine via ssh and run a command, and now I am at the point where I need a button on a web page, which when clicked, fires that script.I am experimenting with http://ift.tt/YnHKnJ as it offers a good place to start, but I am unsure of how to make the button with this. I made a jade partial, but apparently my lack of jade knowledge is getting in my way, and it never displays the partial.

Submitted December 30, 2015 at 09:54PM by the_real_davenull

Get Latest Reddit posts in Node.js

http://ift.tt/1OZRKGI

Submitted December 30, 2015 at 09:56PM by dynamicallytyped

Package Stats for NPM and Its Data Pipeline

http://ift.tt/1JgkIW1

Submitted December 30, 2015 at 09:11PM by mrjoelkemp

I wasn't impressed with the open-source Glacier backup tools out there, so I'm implementing my own in Node.js.

There are more than a few open-source backup tool options out there, but I just wasn't happy with them. I wanted something that worked with Amazon Glacier and worked on a variety of platforms with or without a GUI.Nothing out there seemed to fit those requirements, so I'm creating one called Backup Tool. The tool uses a JSON file to store configuration options for directories to backup, destination information, and AWS authentication information. The core backup functionality is running stably on my Mac, and next I'll be rolling it out to another Fedora machine I have. After that, I plan to go back and write an interactive installer that builds the configuration file and sets up scheduling. (That is all manual right now.) Possibly after that I will look at some GUI options.

Submitted December 30, 2015 at 05:58PM by johnjones4

Up to date, non-trivial Node Tutorials

It seems like a lot of the node tutorials I find are either out of date (not using the newest tools. For example, bower instead of whatever has replaced it) or focus on simplistic applications.I come from a PHP/Laravel background and need a up to date, extensive introduction to Node and it's ecosystem. Ideally in the form of a tutorial that builds a non-trivial application.Any suggestions? (Paid or free is fine but instant access is a must, no bootcamps)

Submitted December 30, 2015 at 06:21PM by pigeondev

Excellent introductory to the concept of generators from ES6

http://ift.tt/1Hq9KNh

Submitted December 30, 2015 at 05:00PM by Not_Cliche

Just built this game in 2 hours, real-time mouse wars!

http://ift.tt/1PrzVmH

Submitted December 30, 2015 at 04:57PM by mknweb

Node on Train - a worthy alternative to Ruby on Rails? Is there anyone experience it?

http://nodeontrain.xyz

Submitted December 30, 2015 at 04:12PM by train255

Transitioning from .NET to Node.JS

Hi all,After spending the past six months trying to soak up all of the amazing knowledge that is continually dropped on this subreddit, I am very happy to be making my first post.I am currently a .NET web developer working with web forms and a proprietary CMS back end. Our set up and workflow is extremely antiquated. Server 2008, messy repositories and SharePoint.Needles to say,things are getting dull and after a year here, I feel it is time for me to consider my next role. For the past six months, I have been really falling in love with the asynch programming of Node.JS. I have a number of my own projects on the go, and always trying to sneak in more JS stuff at work where it makes sense.I am here today to ask you all for support and feedback with a particular dilemma I am faced with. This .NET job has been my first position out of school. I feel that I have made some accomplishments and learned a lot but it is time to move on.Unfortunately with the way things are at my work, if I got a new position next week, I feel that I would leave my team in an unfair spot. My plan is to tell my boss that 6 months from now I will start looking for a new job. During these next six months I am going to do my best to step my game up and make myself a worthwhile candidate for a possible Node.JS or JavaScript position.My current position, anything gets thrown at me. Does not matter if its front or back. Css, DB queries, Task automation with Perl and some new Node.JS additions.My question is, what will job recruiters like to see from me? I have a git repo with some small projects and I have plans to put much more work into it over the next six months.Will I be considered even though I have been working with NET Web Forms, MS SQL, Server 2008 and Proprietary CMS software?What can I do to make myself more of a valued asset?Any recommendations or advice I can get would be extremely helpful as right now I am feeling kind of lost and flustered. The next six months is go time for me, I just want to make sure I am spending it on the right things.Much respect to everyone here and I will definitely be sure to update with any progress or findings I come across.

Submitted December 30, 2015 at 09:05AM by monkeymensch

Tuesday 29 December 2015

How to create a node application like rails tutorial?

http://nodeontrain.xyz

Submitted December 30, 2015 at 06:37AM by train255

Issue with nodejs / Socket.io

i can't use this string get from my socket server{ "name": "HTCVIVE", "text": "azerty" }Can't Parse it or use it ? halp ?my socket serversck.createServer(function(socket) { socket.on('data', function(data) { var string = (data.toString()); io.emit('console', string); }); }).listen(5000, 'localhost');

Submitted December 30, 2015 at 04:50AM by DoneurCreations

Get thousands of courses to learn NodeJS, PHP, Javascript, AngularJS and many more for FREE!

http://ift.tt/1YRL0Qu

Submitted December 30, 2015 at 04:19AM by mahonyja

I'm trying to open 30 event sources while remaining under the rate-limit of my 3rd party api.

I've submitted my question on SO but no response. Can you guys take a look at it? http://ift.tt/1mP2twR

Submitted December 30, 2015 at 03:07AM by imgurceo

node_modules at root of all projects directory?

I've mostly been developing with Node but lately also been exploring Go. The convention there is to have a root directory where all dependencies live (src/ in your GOPATH -- see http://ift.tt/1JPeSr5)I'm curious if anyone has tried this approach with Node.. That is, if I were to have a root projects folder, e.g. /home/thukjeche/projects and in that a node_modules/ folder, any projects in that directory could use/would install module in that directory.Then each project's package.json can specify the version it needs.The main advantage I think this would give is install time (when using the same packages over and over again for different projects, I get quite tired of waiting for npm install to finish, especially for things related to babel).Glad to hear your thoughts

Submitted December 30, 2015 at 12:36AM by thukjeche

How to use HTTPS in Node.js using Express 4.X?

I am beginning my journey into backend development and I have successfully created a login feature for a website. But I would like to add HTTPS to it how do I do this? I have searched all over google and the express documentation but since I'm new I guess I am not getting it. Any help would be greatly appreciated thank you.

Submitted December 29, 2015 at 09:23PM by javascriptJunky

Copy Clicker | Quick and dirty realtime clicker

http://ift.tt/1R6wHGI

Submitted December 29, 2015 at 08:53PM by JodusNodus

Weather in the Terminal (xpost /r/webdev)

I wrote a module that allows the user to type weather into their command line and get the current conditions plus a 3-day forecast right in the terminal. I've already posted this on /r/webdev, but I'm trying to get as much exposure as possible and improve my JS development skills.Critique welcome!

Submitted December 29, 2015 at 08:43PM by TDVapoR

Small library I wrote for working with ES6 promises. Critique welcome.

http://ift.tt/22whZ18

Submitted December 29, 2015 at 03:01PM by geon

gen-readlines: A generator based line reader

http://ift.tt/1fpbiK4

Submitted December 29, 2015 at 01:27PM by qudat

Announcing ESLint plugin for JSDoc v2 (no JSCS dependency, a lot faster and open to new ideas!)

http://ift.tt/1Skskc0

Submitted December 29, 2015 at 11:35AM by BDbMPoISBl5y

Catch and match

http://ift.tt/1mNbE0Y

Submitted December 29, 2015 at 09:55AM by sdgluck

Wednesday 23 December 2015

NodeJS + Rust :)

http://ift.tt/1U5BV4Z

Submitted December 24, 2015 at 12:04AM by jchiedo

A nice little snippet to allow easy access to locally installed packages.

Hi All,I recently discovered an easy way to access locally installed modules via the command line! Just add this to your .bashrc/.zshrc/etc:export PATH=$PATH:./node_modules/.bin It will still prefer globally installed modules, but fall back to local ones. If you'd rather prefer locally installed modules, you can do this:export PATH=./node_modules/.bin:$PATH This makes it a lot easier to debug npm scripts. Enjoy!

Submitted December 23, 2015 at 08:51PM by ariporad

Building and Deploying Node Microservices with AWS Lambda and Semaphore - Tutorial

http://ift.tt/1U2mFG2

Submitted December 23, 2015 at 01:29PM by nikolalsvk

How to interact with DOM element?

Need to do appendChild() on the DOM from my node.js code.

Submitted December 23, 2015 at 12:52PM by GodOfTheMetal

Node.js CMS, that works. What feature do you miss?

http://ift.tt/1mzPcIs

Submitted December 23, 2015 at 10:26AM by nodejsenterprise

Tuesday 22 December 2015

Get data from multiple callbacks without nesting them?

I'm trying to get data from multiple callbacks, but for some reason my variables won't set. For example..var data1 = ""; var data3 = ""; myFunction(function(data) { data1 = data; } mySecondFunction(function(data2) { data3 = data2; } res.render('index', { info: data 1, title: data3}); This won't work. I want to call different functions, and set them inside variables without nesting. How can I do that?

Submitted December 23, 2015 at 01:32AM by scottcfr

Real-time diabetes management with Node.js and Microsoft Azure

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

Submitted December 22, 2015 at 11:58PM by wo1fgang

[Question] Dynamically instantiating classes

I'm posting messages to SQS to handle per-client integrations with other systems. This keeps my code bases separate and allows me to scale appropriate services with ease. The message I'm posting is JSON that describes the client name, integration type, and a few other bits of data that's needed.I'm going to build these background workers in a single project and use the worker tier on Elastic Beanstalk to run it. When they consume a message, I'd like it to instantiate the correct class in the project based on properties in the queue message and then work the message. From there I can invoke the .run() function of the class and let it do its thing.How would I go about this? I've seen examples of people using window['classname'] but I don't know if it's the best. I really don't want to manually maintain a huge switch statement. I also don't want to maintain repos and EB instances for every client integration.I could know the path by naming the class file a particular wayI'm using Babel and the ES2015 presetAny ideas?Edit: Looks like the import statement in ES6 requires the path to be static.

Submitted December 22, 2015 at 11:07PM by RickAndMorty_forever

what the node??

http://ift.tt/1mg2auG

Submitted December 22, 2015 at 10:19PM by toromio

Deploy Node on Linux, 2016 edition

http://ift.tt/1QFmp2f

Submitted December 22, 2015 at 06:37PM by a0viedo

What's the best action to take if you need to modify something in node_modules?

There's a PR open for a fix in a package I want to use, but until such time that is merged, I'm not exactly sure what the best way to use the 'fixed' version is? Should I move the package out of node_modules into my root directory and require it from there?

Submitted December 22, 2015 at 03:18PM by azium

Nixar Pro - Well Design and High Performance

We would like to build the next version. It will be same set of cross-platform commands but written on C Programming Language in order to provide the high performance for users.It would be great if your provide your supportThe project page is http://ift.tt/1ImJlQS about the project:The mission of this project is to transform complex Bash commands into easy to understand joyable equivalents for users with any skill level.We were inspired by Underscore, Linq, Prelude libraries and applied their concept in the Bash command line.If you know one of these libraries, you can reuse this knowledge.

Submitted December 22, 2015 at 11:58AM by askucher

Vote to choose which ORM will be used by Strapi (a Node.js framework based on Koa)

https://twitter.com/strapijs/status/679245190008320000

Submitted December 22, 2015 at 10:49AM by Aurelsicoko

Monday 21 December 2015

Realtime Chatroom with RethinkDB (NodeJS / Express / SocketIO)

http://ift.tt/1QUXypn

Submitted December 21, 2015 at 10:14PM by ShadowCodex

I wrote this post on getting an Let's Encrypt SSL certificate and using in Express.

http://ift.tt/1UXWAsO

Submitted December 21, 2015 at 07:36PM by Kriegslustig

What resources do you suggest to learn Hapi?

What resources did you use to learn the Hapi framework? Books, tutorials and especially real world examples are really appreciated... I took a look and I started with http://ift.tt/1S5ipXU but maybe you have some other good ones... Thanks to all...

Submitted December 21, 2015 at 05:09PM by h4t0n

How can I restart a Node.js child process

http://ift.tt/1QUGQ9F

Submitted December 21, 2015 at 05:32PM by gmemstr

BorrowBot, a tool to help lenders issue loans to high quality borrowers on /r/borrow

http://ift.tt/1MrbwJa

Submitted December 21, 2015 at 01:55PM by snollygolly

[help] [vote] Which Template engine Are you recommend to use?

http://ift.tt/1Mr67BX

Submitted December 21, 2015 at 12:36PM by AminaDev

Example Node.js workflows?

I am sometimes having a hard time grasping what all these tools, build systems, frameworks a libraries are for and at what point are they used.For example, I cannot figure out what is Webpack, why does it exist, what problems does it solve and how. Same applies to browserify... I am assuming it somehow enables me to use Node.js packages in browser, client-side?But at what point do those things even run? Are they used with gulp? From command-line? Both?So is there any good articles / posts / anything explaining some possible Node.js workflows, that explain some relationships between all these tools as well as when and why one would use them?

Submitted December 21, 2015 at 09:27AM by PotatoScript

NMAP network scanner interface for Node! Critiques, complaints, and requests welcome.

http://ift.tt/1MEvdgX

Submitted December 21, 2015 at 09:33AM by n0vat3k

Sunday 20 December 2015

Visual explanation of Apache vs Node.js processing model

http://ift.tt/1TbFO8t

Submitted December 21, 2015 at 06:22AM by bytearcher

How to kill child processes that spawn their own child processes in Node.js

http://ift.tt/1OhLOhL

Submitted December 21, 2015 at 02:36AM by laggingreflex

I developed a Mongoose plugin (validator) to check ID references existence. What do you think about?

http://ift.tt/1UR6axE

Submitted December 20, 2015 at 11:04AM by h4t0n

Why Am I Not Understanding WebWorkers and Promises?

Consider the following code :'use strict'; const Threads = require('webworker-threads'); var p = new Promise((resolve, reject) => { var worker = new Threads.Worker(() => { var fibo = (n) => { return n > 1 ? fibo(n - 1) + fibo(n - 2) : 1; }; this.onmessage = (event) => { console.log(`Calling postMessage on our fibo Worker`); postMessage(fibo(event.data)); }; }); worker.onmessage = event => { console.log('worker received response!'); resolve(event.data); }; worker.postMessage(40); }); p.then(data => console.log(data)).catch(err => console.log(err)); I don't get why the Promise doesn't ever resolve... What am I doing wrong?Note, I used this module: http://ift.tt/19Mk3KS

Submitted December 20, 2015 at 08:56AM by ExBigBoss

Saturday 19 December 2015

Friday 18 December 2015

Single electron process

Hello, jus a quick question: has any one searched how to limit electron to one process? By that I mean if I have an app with a tray icon, and I open a new process by executing "electron main.js" it should show the running process window instead of opening a new one.

Submitted December 19, 2015 at 12:13AM by WerGimity

What are some good sites to learn node?

No text found

Submitted December 18, 2015 at 09:38PM by greatredpie

How do I continue coding after promises?

Hello all,Here's a question I haven't been able to figure out.Currently, I'm working on some code that requires me to do a long running operation first.To ensure that it finishes, I make use of promises.longRunningOp(args) .then(nextOp) .then(nextOp) My question is ( and I believe this is poorly worded but) How does one switch from async to sync programming after a promise has executed?For example, what if I had a "main" function where I'm executing multiple functions.//Main var x = doSomething(y) ... ... //Want to do a long Op longOp(y) .then(functionx) .then(functiony) Instead of going into function x, and function y individually. Is there anyway to return how I was doing it in the "main" before the long running operation where all of the functions (provided that they're not long) would get executed in order?OR. Am I doing this all wrong and since node is inherently asynchronous, I should be doing everything in promises, if anything's going to use promises?(Further clarification: What I'm looking for is a way that i can doMainstuff LongRunningQuery .then( more main stuff here. ) )

Submitted December 18, 2015 at 05:43PM by TLI5

New to Node. I find npm very rough around the edges.

This is a bit of a rant and some specific questions, so please bear with me. My background is in Java but I'm transitioning to front-end dev (it's a long story; I just find myself enjoying dynamic programming these days)I came to Node by way of Angular. The seed project for angular utilizes a node container with end-2-end testing utilizing node packages. Other than running some tests and using node as a http server, I'm not doing much on the server side and my knowledge of node/npm is basic: defining dependencies in package.json, installing npm packages (global and proj specific) and that's it.My trouble so far has been with npm in particular. I understand it's inspired by Ruby gems and my experience is with jars and ant/maven in the java world. What I find confusing is all the conflicts with versions and compatibility between Node and NPM. Node ships with npm, but then npm can be installed separately and there seem to be issues with interoperability/versions; every time I've run into issues and checked stackoverflow or elsewhere, people usually suggest updating versions. It just doesn't seem well-documented.npm as a tool itself doesn't provide the best answers even with logging level set to verbose. For example I get an install fail with npm ERR! code 1 and searching for it produces no documentation other than posts by people who are seeing similar issues. There was another error I got which just told me that issue is with the package itself and not npm and that's it. Not running on top of some VM or node itself, npm seems too tightly tied to the OS and therefore has issues related to sudo privileges, global vs local installs and it's just not as solid/mature as the packaging/build tools in the java world.I wish I could package all the dependencies into a single archive like with java WAR or EAR files that's all-inclusive and drop it onto a VM to deply not having to worry about recreating a similar runtime environment where dependencies have to be downloaded and installed separately.--rant over--Over to my question. My local version of the Node app which just serves a few html and javascript files runs ok. I signed up for a heroku account to host this node 'app' and heroku allows one to push git commits directly to their site and it builds the environment from the same package.json as my local machine. Heroku errors out every time on the same build and doesn't create the proj or node_modules folder, whereas on my local machine even though I see the error, it actually creates the node_modules folder and starting up the app it seems to work fine.I can provide more detail if anyone is interested, but my first question is generic: have you guys faced something similar with problems setting up a node environment to run your code and had issues with installing packages on two different environments? If so, what are some of the things to watch out for? I know one is to be careful about global packages and another is to specify node and npm versions explicitiy in the 'engines' param.Second, what's a good resource/tutorial to get a handle on using npm?Thanks

Submitted December 18, 2015 at 04:43PM by vgn

Thursday 17 December 2015

How best to handle communication between my distributed systems?

Hey all,I've been banging my head against a brick wall for the past couple of days trying to find the best solution for this, however I'm not getting anywhere fast.So, I have a number of clustered processes that currently communicate via an AMPQ (RabbitMQ) messaging queue, which essentially queues jobs and data to be processed.Simplified overviewQueueUnfortunately I misunderstood how PUSH/WORKER queues work, so currently I send a PUSH message to initiate a data stream and to ensure that the message is requeued should anything go wrong, I don't acknowledge that PUSH message.The issue with this, is that any other PUSH messages, i.e. for another data stream or more importantly, the PUSH messages for the data it self, won't be delivered until I acknowledge all unacknowledged PUSH messages.Has anyone got any idea's on the best way to handle this? I'm looking at REQ/REP, however I'm not sure whether this will be any different.Thanks.

Submitted December 18, 2015 at 07:08AM by gRoberts84

Deploying a MEAN Stack using Ansible

http://ift.tt/1Qtbfxb

Submitted December 18, 2015 at 04:12AM by fruiapps

Clusters, Children, and Performance

I'm very new to node and looking to improve an existing server/app. I currently have a load balancer on the front end sending traffic to separate servers, each running the same node app. From what I understand, node operates on a single thread - since my machines have multiple cores, what is the most efficient setup for maximizing performance while scaling up? Does using a child/cluster method allow me to use parallel "instances" of the app, taking up more threads? My thoughts were to either A.) spin up a bunch of single-core systems each running the node app, B.) maintain only a few multi-core systems, running multiple "instances" of the app. I apologize for the gaps in my knowledge, please let me know if I need to clarify. Any suggestions are much appreciated!

Submitted December 18, 2015 at 01:18AM by smoothjabz

A very big thank you to everyone that creates node.js training content on the web.

I just finished a big express/node project and I found the online materials, including StackOverflow, to be very helpful. A big shout out to Bucky @ The New Boston for getting me going in the right direction and eli5-ing the content for a dum-dum like me.

Submitted December 17, 2015 at 11:10PM by BackPacker777

Strapi - Node.js framework - New release version 1.5.0

Hi guys !On our latest post, we were looking for beta-testers for Strapi. Here we come again to introduce the new features available. Thanks to your feedback and the beta-testers, we released our first long term support version.What's new on Strapi:Improved the documentation (more examples, new sections)Improved the Studio (powerful tool to design API and manage application settings in the browser)Added native GraphQL supportIntegrated an auto-reload configuration for zero-downtime (thanks to cluster)Improved the administration panel to easily manage your dataThe Reddit community is very important to us! A lot of our community members comes from Reddit. We would be pleased to hear your feedback on this version again.To conclude, there is still a question. We've opened a discussion on our public Slack to move to Sequelize/Bookshelf instead of Waterline ORM. We need your advice to make the best choice for the future of Strapi. What's your opinion about this?

Submitted December 17, 2015 at 10:39PM by Aurelsicoko

Really easy: why my code don't execute POST method (express)?

I'm stuck with this so bad that I'm almost pray for your help, folks. This code is running succesfully, but POST method just don't working at all (console.log('Hello POST'); logging nothing, for example).var express = require('express'); var app = express(); // This responds with "Hello World" on the homepage app.get('/', function (req, res) { console.log("Got a GET request for the homepage"); res.send('Hello GET'); }) // This responds a POST request for the homepage app.post('/', function (req, res) { console.log("Got a POST request for the homepage"); res.send('Hello POST'); }) var server = app.listen(8081, function () { var host = server.address().address var port = server.address().port console.log("Example app listening at http://%s:%s", host, port) })

Submitted December 17, 2015 at 09:33PM by GodOfTheMetal

A tutorial on how to use ShipIt, a Javascript automation and deployment tool

http://ift.tt/1QsiMwj

Submitted December 17, 2015 at 08:43PM by snollygolly

Google improved the randomness of Math.random() in V8

http://ift.tt/1k4ybnO

Submitted December 17, 2015 at 08:21PM by a0viedo

Writable Streams in Nodejs

http://ift.tt/1OyJlcV

Submitted December 17, 2015 at 05:11PM by goshams

Ruler app using frameless windows made with Electron

http://ift.tt/1maes7M

Submitted December 17, 2015 at 03:22PM by misokol123

Nginx team: 5 Performance Tips for Node.js Applications

http://ift.tt/1MjwFIN

Submitted December 17, 2015 at 10:22AM by ilushenciy

What would be the best way to execute untrusted code in a sandbox on a nodejs web server?

Hi, for some reasons, I need to execute untrusted javascript on a nodejs server. What would be the best way to do that ?Is there a native way to do that with nodejs ? or do I need to sandbox the script with an external third party tool (like nodejs running inside docker, ... ) thanks.If you have any resources on the subject, please, let me know.

Submitted December 17, 2015 at 09:47AM by _van_buren_

Wednesday 16 December 2015

Node.js Development Company | Node.js Developers for Hire

http://ift.tt/1P8xk0E

Submitted December 17, 2015 at 07:02AM by pingraviraj

I want to learn all the cool new es6 stuff, where to begin?

I would love to learn about all the new ES6 features and have been using them to a very light extent, like promises which are incredibly easy compared to any promise library I have ever used. I prefer youtube videos, so if anyone has a good youtube series that focuses on the es6 aspects, that would be wonderful!

Submitted December 17, 2015 at 06:48AM by distortednet

Reverse proxy for image gallery

I've got an image gallery with links to images on different random hosts (can't host em myself)Since the server is HTTPS, I figured I could get the images with node.So currently I'm editing the URL's for the images before sending them to the clients, then doing thisvar request = require('request') app.get('/gallery', function (req, res) { var url = req.url.slice(req.url.indexOf('?url=') + 5) req.pipe(request(url)).pipe(res) }) It seems to work just fine... My question is if I should consider something more. Security / other quirks?

Submitted December 17, 2015 at 02:10AM by Cuel

Simple node app that monitors several pages uptime and performance

GitHub: http://ift.tt/1IabDhc reddit, I am in the process of teaching myself javascript/node, and as one of my first learning projects, I made a simple tool that monitors specified webpages uptime and performance and notifies you or your team (via Email, SMS, Slack, and/or HipChat) if anything goes down. I'm obviously not expecting much reception from this post, but if one person happens to find this useful to them, then I think it was worth sharing. Thanks everyone!

Submitted December 17, 2015 at 02:04AM by tj-h

Looking for a method to listen for an event(variable change or keypress)

I'm a noob. I've been looking for a method to listen for a clipboard paste change for a while, but had no luck, found lots of methods that don't work though!I want to create a daemon that snatches the user's clipboard and puts the contents in a database.Looked through node events but found nothing of interest, and found this snippet that listens for key events but only if the application runs in the foreground. My application will run as a daemon.var keypress = require('keypress'); // make `process.stdin` begin emitting "keypress" events keypress(process.stdin); // listen for the "keypress" event process.stdin.on('keypress', function (ch, key) { console.log('got "keypress"', key); if (key && key.ctrl && key.name == 'c') { process.stdin.pause(); } }); process.stdin.setRawMode(true); process.stdin.resume(); This is the snippet that I have currently:var copier = function (callback) { cboard.paste(function (err, data) { if (err) { console.log("Something happened!"); callback(err); } callback(data); }); }; copier(function (data) { console.log("This is the clipboard:" + data); }) It's using the copy-paste npm module. It works! Once.I'm going to continue trying things on my own, but any help would be greatly appreciated!Thank you

Submitted December 16, 2015 at 07:41PM by __-_-_-_-__-_-_-_-

environment variable question

since I'm using webpack, I have to compile it when im ready for production and my hot module reload does not work to show live edits.I want to be able to do like "npm run dev" or a similar command. In my index.html i would have a line that would be likeif( node environment = dev){ } elseif (node environment = production){ }and based on whether I type npm run dev, or npm run production. it would execute the line accordingly.Is this possible? Can I see working code?

Submitted December 16, 2015 at 07:25PM by Datnoidpoop

Question regarding best practices and architecture from a newbie.

*If this is the wrong sub to be posting to please disregard everything below and point me in the proper direction *Hello all,As the title says, I am a newbie so bear with me please. I am interested in writing a small application which will be hosted on OpenShift. As I currently see it, my Node server will act as a web-server (serving the html and my AngularJS stuff) AND the same server will also act as an API with endpoints and database access.As I see it, in my head, any RESTful actions preformed on the page will point to the '/api/ENDPOINT' location.Is what I am doing, or how I envision this happening, absolutely moronic?Should I go about separating the Web-server and API into two different Node servers?In major production environments is any of the above inappropriate?Could you provide me with links or information on security practices to protect the server(s)? I've found a bunch on my own, however, as I am a newbie I am not sure how great the information is - nor is my understanding of server security that great.Finally, I watched a video on Swagger the other night and what interested me the most is the easy ability to cache the DB for "n" seconds to prevent DDOS attacks etc. Would you recommend something other than Swagger to achieve this?Thanks!

Submitted December 16, 2015 at 05:35PM by WasDroppedOnHead

So, I want to learn to use Node.js

Hello /r/node!I'm a recently graduated web developper, and I'm extremely interested in learning Node, as it seems a pretty big thing now.Now, I do understand what it does to some extent, and what it's used for, but I can't help it but feel lost and overwhelmed everytime I look something up. After a couple of tutorials, I've got a generic idea of how things work, but I still feel confused and uncomfortable using Node, and would like to know if there's any direction/path/tutorial I should take in order to get the ropes of how all this works, and what it does.Sorry for the confusing post.

Submitted December 16, 2015 at 05:42PM by CptSpades

Readable Streams in Nodejs

http://ift.tt/1lPNFy6

Submitted December 16, 2015 at 04:08PM by goshams

End-to-end encryption between Node.js and webcrypto

http://ift.tt/1lPNCSQ

Submitted December 16, 2015 at 04:11PM by dynamicallytyped

Scoping roles in Hapi

http://ift.tt/1P6Mbsv

Submitted December 16, 2015 at 01:33PM by thebergamo

Makefile and JavaScript

http://ift.tt/1UuhXlj

Submitted December 16, 2015 at 12:50PM by medavidme

Aargh in Node.js, 100 new requests while still serving the first one

http://ift.tt/1Ygrban

Submitted December 16, 2015 at 12:36PM by medavidme

Tuesday 15 December 2015

Check out the new features in Express.js 4.0

http://ift.tt/1QrH9tQ

Submitted December 16, 2015 at 07:04AM by SamAndreas

Boosting computation speeds using concurrency in NodeJS

http://ift.tt/1Rn1m41

Submitted December 16, 2015 at 05:05AM by wo1fgang

Node.js Version Usage in Commercial Projects

http://ift.tt/1RQDvJs

Submitted December 15, 2015 at 11:39PM by svemirac

Questions about best practices in writing modules

Hi guys, I'm writing a custom module to upload my MongoDB dump into Dropbox at interval and I have some questions about best practices in writing modules:Module is basically a function with an 'options' argument. Some of the properties of that argument are required (like Dropbox app ID and secret), is there a way to check required properties and throw an Error if they are missing? Keep in mind that the module will be largely extended in the future.Is there a correct way to throw errors? Currently I'm using the Error class, is that the best practice?I will approach this project with TDD but I can't figure out what kind of tests I should perform. I think that I should write a test for every option, am I right?There is a general rule to organize the project structure? Should I split in files every single function, put them into some folder and include them?I know that probably there is already a module that do the exact thing I have to do, but the main objective of this project is improving my skills and build some best practices. Thank you all!

Submitted December 15, 2015 at 08:54PM by Lampad1na

I switched from PHP to Node recently and want to start working on open source. Suggestions?

I've been using PHP since pretty much when I got started in web dev about 5 yrs ago. Over the last 4 months I've been transitioning to Node and really want to start giving back to the community. However I can never think of a module to build (typical...). So I'm wondering if anyone wants a hand with something they're working or knows of a good way to get started in the open source community.Thanks in advance ☺

Submitted December 15, 2015 at 08:28PM by JordanCallumA

Guess Famous People game built on React Native and Node

http://ift.tt/1TOdlWe

Submitted December 15, 2015 at 08:41PM by DimitriMikadze

Why Microservices Work For Us

http://ift.tt/1O7e3j2

Submitted December 15, 2015 at 07:56PM by lambtr0n

I'm an intern that became the leader of a project, need a bit of guidance

As the title says I was a software engineer intern that suddenly became the leader of a project that it's too huge from previous projects.It's a project that divides into two projects, one project is to create a platform of online learning such as Coursera and the other one is being to control the users that have registered allowing the company to change their status for example from new to telemarketing and some other things, I was digressing.So far I was looking into several web frameworks and after seeing the lecture of Ryan Dahl link and having more experience in it I'm more inclined to pick node for the development of both projects.Upon further investigation, I was reading about creating cluster of servers and mixing databases but I haven't found much that can give me a clear view of what are the purpose of that.Am I on the right track by thinking that node is a good option or my lack of experience is clouding my judgement?

Submitted December 15, 2015 at 05:34PM by Frekkon

How to implement Digest Authentication in NodeJS

http://ift.tt/1ZYhRX3

Submitted December 15, 2015 at 03:56PM by goshams

Looking for a MEAN framework for Node 4.2

I tired to use the yo generator the other day with MEANjs but I ran into some errors. I believe I got these errors because MEANjs is not compatible with Node 4.2. Does anyone know of a a good framework for a MEAN app that works with Node 4.2? (preferably not MEAN.io)Historically I've stuck with express but I am getting more familiar with Angular and want to make sure I am structuring my projects in a coherent fashion.

Submitted December 15, 2015 at 03:59PM by Internetuser100

Node.js Weekly Update - Dec 11st, 2015

http://ift.tt/1SZaU2M

Submitted December 15, 2015 at 12:37PM by gergelyke

Going serverless with Amazon S3 and Lambda

http://ift.tt/1Z9LraL

Submitted December 15, 2015 at 11:30AM by jsalonen

An easy to use WebSocket account manager

http://ift.tt/1mljzST

Submitted December 15, 2015 at 10:27AM by kostarelo

Node.js readFileSync ZIP file

Hopefully someone can help! I've been asked to retrieve the contents of a ZIP file sitting on a server. I know the software uses eval() so I'm making use of this. I do not have access to the server so can't install modules.fs.readFileSync('/dir/file.zip','utf-8') When the output gets ptinted to the screen, it looks promising e.g.PK�coG���^�*fileinquestion.txtUT.......... However when I save the resulting text to notepad and save it as a ZIP file, I get the message that its corrupted or not a valid file.I know the ZIP file on the server is valid, but how to do I go about extracting it using the function or above, via the eval() function?

Submitted December 15, 2015 at 10:09AM by FestivalGeek

Monday 14 December 2015

Server-Logger@1.0.2 Console Custom Logger

http://ift.tt/1Yc8VPu

Submitted December 15, 2015 at 06:33AM by lucasgolino

Shared HTML Modules with with Jade and NPM: I wrote a Gulp plugin for resolving Jade files to arbitrary filesystem paths and the node_modules directory

http://ift.tt/1SYbEFm

Submitted December 15, 2015 at 01:40AM by mcmouse2k

Global Modules not running

I'm having issues on one of my servers (CentOS).Node is updated to the latest version and global modules aren't working - I'm not really sure if they ever have.The install used to work fine and give no errors.. but now I get this[nhyland@natdm ~]$ sudo npm install -g babel-cli [sudo] password for nhyland: npm http GET http://ift.tt/1m2CMIx npm http 304 http://ift.tt/1m2CMIx npm ERR! error rolling back Error: Refusing to delete: /usr/local/n/versions/node/4.0.0/bin/babel not in /usr/local/n/versions/node/4.0.0/lib/node_modules/babel-cli npm ERR! error rolling back at clobberFail (/usr/lib/node_modules/npm/lib/utils/gently-rm.js:41:12) npm ERR! error rolling back at next (/usr/lib/node_modules/npm/lib/utils/gently-rm.js:27:14) npm ERR! error rolling back at /usr/lib/node_modules/npm/lib/utils/gently-rm.js:36:12 npm ERR! error rolling back at FSReqWrap.oncomplete (fs.js:82:15) npm ERR! error rolling back babel-cli@6.3.17 { [Error: Refusing to delete: /usr/local/n/versions/node/4.0.0/bin/babel not in /usr/local/n/versions/node/4.0.0/lib/node_modules/babel-cli] npm ERR! error rolling back code: 'EEXIST', npm ERR! error rolling back path: '/usr/local/n/versions/node/4.0.0/bin/babel' } npm ERR! Refusing to delete: /usr/local/n/versions/node/4.0.0/bin/babel not in /usr/local/n/versions/node/4.0.0/lib/node_modules/babel-cli File exists: /usr/local/n/versions/node/4.0.0/bin/babel Move it away, and try again. npm ERR! System Linux 2.6.32-042stab092.3 npm ERR! command "/usr/local/n/versions/node/4.0.0/bin/node" "/usr/bin/npm" "install" "-g" "babel-cli" npm ERR! cwd /home/nhyland npm ERR! node -v v4.0.0 npm ERR! npm -v 1.3.6 npm ERR! path /usr/local/n/versions/node/4.0.0/bin/babel npm ERR! code EEXIST npm ERR! npm ERR! Additional logging details can be found in: npm ERR! /home/nhyland/npm-debug.log npm ERR! not ok code 0 [nhyland@natdm ~]$ babel -bash: babel: command not found [nhyland@natdm ~]$ node -v v5.2.0 [nhyland@natdm ~]$ npm -v 3.3.12 Why is it going to 4.0? Do I have to change something?Edit: I removed /usr/local/n/versions/node/4.0.0/bin/babel and a few other folders it complained about and ran the same install command and it worked fine, but I still can't run it..[nhyland@natdm ~]$ sudo rm -rf /usr/local/n/versions/node/4.0.0/bin/babel-node [nhyland@natdm ~]$ sudo npm install -g babel-cli npm http GET http://ift.tt/1m2CMIx npm http 304 http://ift.tt/1m2CMIx [...] npm ERR! error rolling back babel-cli@6.3.17 { [Error: Refusing to delete: /usr/local/n/versions/node/4.0.0/bin/babel-external-helpers not in /usr/local/n/versions/node/4.0.0/lib/node_modules/babel-cli] npm ERR! error rolling back code: 'EEXIST', npm ERR! error rolling back path: '/usr/local/n/versions/node/4.0.0/bin/babel-external-helpers' } npm ERR! Refusing to delete: /usr/local/n/versions/node/4.0.0/bin/babel-external-helpers not in /usr/local/n/versions/node/4.0.0/lib/node_modules/babel-cli File exists: /usr/local/n/versions/node/4.0.0/bin/babel-external-helpers Move it away, and try again. [...] npm ERR! not ok code 0 [nhyland@natdm ~]$ sudo rm -rf /usr/local/n/versions/node/4.0.0/bin/babel-external-helpers [nhyland@natdm ~]$ sudo npm install -g babel-cli [...] babel-cli@6.3.17 /usr/local/n/versions/node/4.0.0/lib/node_modules/babel-cli ├── slash@1.0.0 ├── log-symbols@1.0.2 ├── path-is-absolute@1.0.0 ├── path-exists@1.0.0 ├── fs-readdir-recursive@0.1.2 ├── convert-source-map@1.1.2 ├── v8flags@2.0.10 (user-home@1.1.1) ├── commander@2.9.0 (graceful-readlink@1.0.1) ├── chalk@1.1.1 (escape-string-regexp@1.0.3, supports-color@2.0.0, ansi-styles@2.1.0, has-ansi@2.0.0, strip-ansi@3.0.0) ├── output-file-sync@1.1.1 (xtend@4.0.1, mkdirp@0.5.1) ├── glob@5.0.15 (inherits@2.0.1, once@1.3.3, inflight@1.0.4, minimatch@3.0.0) ├── chokidar@1.4.1 (glob-parent@2.0.0, async-each@0.1.6, inherits@2.0.1, is-glob@2.0.1, is-binary-path@1.0.1, readdirp@2.0.0, anymatch@1.3.0) ├── bin-version-check@2.1.0 (minimist@1.2.0, semver-truncate@1.1.0, semver@4.3.6, bin-version@1.0.4) ├── source-map@0.5.3 ├── babel-core@6.3.17 (shebang-regex@1.0.0, babel-template@6.3.13, babel-messages@6.3.18, babel-helpers@6.3.13, private@0.1.6, debug@2.2.0, minimatch@2.0.10, babel-code-frame@6.3.13, babel-types@6.3.18, babylon@6.3.18, babel-generator@6.3.19, babel-traverse@6.3.19, json5@0.4.0) ├── request@2.67.0 (is-typedarray@1.0.0, aws-sign2@0.6.0, forever-agent@0.6.1, caseless@0.11.0, stringstream@0.0.5, tunnel-agent@0.4.2, oauth-sign@0.8.0, isstream@0.1.2, json-stringify-safe@5.0.1, extend@3.0.0, combined-stream@1.0.5, node-uuid@1.4.7, qs@5.2.0, mime-types@2.1.8, form-data@1.0.0-rc3, tough-cookie@2.2.1, bl@1.0.0, har-validator@2.0.3, http-signature@1.1.0, hawk@3.1.2) ├── lodash@3.10.1 ├── babel-register@6.3.13 (home-or-tmp@1.0.0, source-map-support@0.2.10, core-js@1.2.6) ├── babel-runtime@5.8.34 (core-js@1.2.6) └── babel-polyfill@6.3.14 (babel-regenerator-runtime@6.3.13, core-js@1.2.6) [nhyland@natdm ~]$ babel -bash: babel: command not found [nhyland@natdm ~]$

Submitted December 14, 2015 at 11:38PM by natdm

Why does this work and can I do it better? XML DOMParser question.

Hello node.js developers and users! I am newer to javascript, but I'm working a in a job where everyone pushes me to use node.js but few can take the time to explain the basics.I work on a very monolithic tool for M&E and it spits out xml backup files and (in my use case) with way too much information such as object ownerships. So I'm attempting to remove them with the following:var xmlDP = new DOMParser().parseFromString(xmlFile,'text/xml'); //Get all user tags var x = xmlDP.getElementsByTagName("user"); var i = 0; var j = x.length; //remove all user tags for (i = 0; i < j; i++){ //console.log(i); x[i].parentNode.removeChild(x[i]); } If I do this:console.log(serializer.serializeToString(xmlDP)); Low and behold, it works!, but I don't know why.Why does removing a child from x affect the var xmlDP at all?Is there a better way to do this that is a little more self documenting?I had to put counters in a separate var (j) because it would quit early if I did i < x.length, why is that?If it is because x.length is a moving target in this case, why doesn't that moving target also get applied to j? What makes j static now?

Submitted December 14, 2015 at 05:03PM by travelphototim

Is it possible to monitor and redirect HTTP requests (OSX) system-wide with node?

INB4 browser plugins - I am a webdev and could make such a thing but i want to tackle this issue at a system level so i dont have to test, manage and package for X different browsers.I'm trying to make a system whitelist app for my OSX machine ( and hopefully also android down the line) which regexes browser traffic and optionally redirects it. It would by default block all requests coming out of browsers unless they met certain criteria.I initially thought this wasn't node's domain, even though JS is my realm, and asked python and golang people for advice. I've now come full circle and am wondering if I could make such a (proxy server?) thing in node.Can someone offer me any examples of monitoring local http requests in redirecting in node or in general? Thankyou :D

Submitted December 14, 2015 at 04:33PM by basiclaser

Node client for the MonkeyLearn API: build and consume machine learning models for text analysis from your Node apps

http://ift.tt/1Md4M1w

Submitted December 14, 2015 at 03:40PM by wildcodegowrong

http://ift.tt/1jYc4Q9 Starter Kit

http://ift.tt/1RNa8Yk

Submitted December 14, 2015 at 01:44PM by snollygolly

Continuous deployment in under 30 seconds, wrapping github webhooks and pm2.

http://ift.tt/1Nl0eKi

Submitted December 14, 2015 at 01:26PM by hackeralterego

How to tail -f a log file using streams?

No text found

Submitted December 14, 2015 at 10:35AM by purezen

Sunday 13 December 2015

What am I supposed to do with Buffers in Node?

I'm reading through "Professional Node.js" and I'm not sure what the point is of the buffers.Please correct me if I'm wrong, but from my understanding Buffers are sort of like a storage area or queue where "tasks" are placed that are going to be done.And it can store different types of data like base64 or binary data?I ran some example code:var utf8String = 'my string'; var buf = new Buffer(utf8String); var base64String = buf.toString('base64')console.log(base64String);'my string' is equal to: bXkgc3RyaW5nBut... so what? What kind of use does this have for me?

Submitted December 14, 2015 at 01:52AM by fastpenguin91

A nodejs login system using mongoDB

http://ift.tt/1IOoxSd

Submitted December 13, 2015 at 11:30PM by mcduder1

Pincer - Trending Node.js Modules

http://pincer.io

Submitted December 13, 2015 at 10:56PM by javascripton

Basic API in Node with Angular + Restangular in the frontend

http://ift.tt/1P1Bp6X

Submitted December 13, 2015 at 08:50PM by keyserfaty

Learning nodejs frameworks

Hi, I'm interested in building websites (frontend and backend). I have basic knowelegde in JavaScript. But my question is - how deep must I know node.js to start learning express.js or sails.js? Thanks

Submitted December 13, 2015 at 06:24PM by rabarbas

#nodeinteractive videos online

https://www.youtube.com/playlist?list=PLfMzBWSH11xYjL8oFumSfzOf6-kr8_t-o

Submitted December 13, 2015 at 06:06PM by eljefederodeodeljefe

Can this app be built using node ?

Hi,I'll start with a little about me, I am a web developer and I build stuff with HTML, CSS and PHP. I also work a lot with wordpress.I had a bunch of students approach me for help with an application they want to build for their college.It a due management system,At the end of every year students will have dues (department wise) and they need a system to track it.Separate logins to each department where they shall enter and edit student dues.An administrator login that can view all dues.I can do this using PHP and MySQL, but I was wondering if I could take it up as a challenge and do it using JavaScript. I've always wanted to learn stuff like node.js and the other JS libraries.Need your opinion on this and more importantly can such a system be build using node ?Thanks

Submitted December 13, 2015 at 12:55PM by mattscar7557

Saturday 12 December 2015

Can't start app using pm2

Installed viasudo npm install pm2 -g then I typedpm2 start app.js -i 0 and got the result below.http://ift.tt/1QcTan6 when I try to access my app, (localhost:4000), I can't. I run my node app in production mode and I can't see anything wrong here.Node : 4.2.3Npm : 3.5.1What could be the problem?

Submitted December 13, 2015 at 05:42AM by laraveling

How can I create an image from multiple png?

Hi, I need to create an image merging together some png. I've seen that exists canvas but it require dependencies and I need something that use only nodejs.

Submitted December 13, 2015 at 03:19AM by alegatti

Can anyone recommend a good load test / benchmark service?

Hey all, I'm trying to load test our Node app from my local machine but I think there is a bottleneck occurring at my side when actioning my siege load test. Just wondering if anyone can recommend a 3rd party provider that would have access to multiple hosts in different networks that could action the load test concurrently to get a realistic outlook on the server benchmarks.Thanks

Submitted December 13, 2015 at 12:45AM by techie_freelancer

What do you think is the best way to use PostgreSQL in node?

I have been thinking about this lately a lot and looking at the current libraries available I'm at a loss at what to do.I have used Waterline a bit and while it makes it easy to start something, I find it more and more lacking as I go. Overall it feels a bit immature, similar to the way sails feels.Also looked at Bookshelf but was instantly turned down due to the lack of documentation/examples. Plus I came across this year old discussion about the next version, which looks (if it delivers) very promising but is nowhere to be seen. It looks like a lot of added functionality over knex, but it doesn't actually make life easier.Haven't checked out Sequelize yet, but from what I have read most people prefer Bookshelf over it, which makes me wonder if it's even worth the time.I started wondering whether it would be worth it to just look for a library to handle validations and write a small wrapper over knex.What do you think? What libraries do you use (if any)?

Submitted December 12, 2015 at 04:02PM by mitom_

leave messages for yourself in the terminal (built with node)

http://ift.tt/1RKbwel

Submitted December 12, 2015 at 01:56PM by lepuma

Friday 11 December 2015

How to use Promises in Node.js

http://ift.tt/1NkB6kL

Submitted December 12, 2015 at 06:49AM by goshams

Property Manager - Manage your properties in a clean and efficient way

http://ift.tt/1lUByPt

Submitted December 12, 2015 at 03:12AM by panbhatt

Thrilled to have reached over 950 stars on GitHub with my simple, but useful lib.

I just want to write this post to share my brief story about how I somewhat unintentionally ended up reaching over 950 stars and reaching global trending for five days in a row on GitHub after writing a small lib as a showcase for a job interview.I work as a system architect / developer for a retail company that have nothing to do with technology and just recently I realized that working here doesn't pose any challenge for me as a developer and that it will be very difficult for me (given that the focus of the company is just sales) to sustain a constant pace of learning and improving myself.Because of that I started looking for a place to work where I can really push my boundaries and be involved with people with the same interests as me, and also be able to absorb knowledge from more experienced people than me.In my search for this place to work, I found a place that I really liked and applied for a job there.In the first steps of the candidacy I was asked if I had anything published or contributed on GitHub that I could show presumably for their team to analyze and have a better understanding of my capabilities. Well. I didn't.After this conversation, we scheduled a personal interview to move with the process. But it concerned me that I really didn't have anything by my own published and I thought that having such a thing would be a good Idea so that night I slept thinking on what I could make to maybe present at the day of the interview.This is how DreamJS was born.I wrote the lib in a small amount of time (after all it is a very simple lib) but I finished it just a couple hours before the interview and I actually never got the chance to present it on the interview day.Unfortunately I didn't got the job (maybe because I was nervous and didn't do well on the small test that they gave me) but when I woke up the next day I was trending on Github.The feedback from the community has been amazing and I will keep improving the lib since it has caused me so much joy and fun to make it and it felt really good to be able to provide something useful for the community.The link for the lib in case anyone wants to check it out is: http://ift.tt/1mfp1GR by the way... I am still looking for a job ;)

Submitted December 11, 2015 at 08:13PM by Zartharus

go-to-node: Node.js go-to packages

http://ift.tt/1NgiqF3

Submitted December 11, 2015 at 04:17PM by thodoris12

How to protect an open endpoint

(noob question) I'm developing an app and it is using an open endpoint, how do I go about ignoring all the requests that are not generated from my app

Submitted December 11, 2015 at 11:27AM by theSheth

Stable version of credential released - Easy password hashing and verification in Node

http://ift.tt/1zHdoI7

Submitted December 11, 2015 at 10:37AM by mastilver

Event Emitters + Mixpanel tutorial. Enjoy everyone! Let me know what you think in the comments.

http://ift.tt/1RI3bI9

Submitted December 11, 2015 at 08:40AM by dlombardi

Auth in Hapi with JWT

http://ift.tt/1UbihoS

Submitted December 11, 2015 at 08:55AM by thebergamo

Thursday 10 December 2015

Empire of Code, new game for coders from CheckiO Team

My name is Alex from CheckiO.We’ve recently launched a new game Empire of Code http://ift.tt/1LeoUlC. Empire of Code is a more simple game with coding challenges and competition between two forces: JavaScript(nodejs) and Python. The idea is very simple: you build your own star-base and fight against enemies and other players to expand your territory.Players can write their own fighting strategies and steal other's’ strategies. They can improve buildings by solving coding puzzles.It’s a fun game for players with and without coding skills, but coding skills are definitely to your advantage in the game.If you find that concept interesting, please check out the game and tell me what you think of it.Thank you so much for your time,

Submitted December 11, 2015 at 06:46AM by AlexOduvan

Express.js path issue

I'm trying to render html files but I'm having an issue.This works.app.get('/randomlink', function(req, res) { res.sendFile( __dirname + "/views/" + "test2.html" ); }); But I don't want to copy and paste dirname thingy over and over, so I tried this. app.use(express.static(path.join(__dirname, 'views'))); app.get('/randomlink', function(req, res) { res.sendFile('test2.html'); }); My express version is 4.13Here's the error.path must be absolute or specify root to res.sendFile

Submitted December 11, 2015 at 05:22AM by laraveling

Best practices of building a website using node.js

Similar to this, as a complete newcomer to it and having limited knowledge of Javascript/jQuery, I would like to know what you consider to the best practices for building a website from scratch using Node.js.

Submitted December 11, 2015 at 05:09AM by jalabi99

Best templating engine for async updates

I've been looking into starting to use a templating engine as I want to clean up my single page app.Currently my structure is such:express / socket.ioand a single html page where I just hide html to transition (which I did temporarily until I figure things out)I've been struggling to figure out what would be easiest for me to port my code into a structure where:if a user lands on/index or / they would be shown a connect page, and I would connect them via. socket.io and move them to something like:/dash or /#dash Im not sure what the best way to go about this is, as looking around I see multiple methods for everything but generally speaking I am looking to stick with express/socket.iotldr; looking to have actual pages instead of throwing everything into the dom and hiding/showing it as neededsorry if this is unclear!

Submitted December 11, 2015 at 02:49AM by nastus

Supertest + JWT

http://ift.tt/1OVRcnG

Submitted December 10, 2015 at 10:14PM by shtaft

Looking for some tips on code organisation with web sockets.

Hey guys!I'm recreating a board game (Dominion) as a node app for learning purposes, using socket.io. I've previously done a chat app, so I think have the basic socket stuff down. The biggest problem I am facing right now, is the organisation of socket code. Until now, everything was in one file. Here's the basic code structure:app.jsrequire('./config/socket.js')(server,sessionStore); ./config/socket.jsmodule.exports = function (server,sessionStore) { var io = require('socket.io').listen(server); var saved_sockets={}; //Expose session to socket io.use(function (socket, next) { ... }); //Socket io.on('connection', function (socket) { //Setup var user=socket.session.chat.user; var userId=socket.session.chat.userId; saved_sockets[user]=socket.id; console.log(' [socket.io] connection: '+user+' ('+saved_sockets[user]+')'); socket.join('lobby'); socket.emit('chat-setup',{user:user}); socket.broadcast.to('lobby').emit('message',{room:'lobby',type:'info',from:'system',message:'The user <'+user+'> joined!'}); //Disconnect socket.on('disconnect',function() { delete(saved_sockets[user]); io.sockets.to('lobby').emit('message',{room:'lobby',type:'info',from:'system',message:'The user <'+user+'> left.'}); }); //EVENTS HERE socket.on('some-event',function(data) { ... stuff ... }); Right now all my events, for the pre-game lobby, chat, game mechanics etc. is all in this file, under "//EVENTS HERE". As you can imagine, the file is starting to get big and I'd like to move parts of the code to different files. Is there a way to do this, maybe similar to having different files for different routes in the express app? Maybe something like:var someEventHandler=require('.../socket_handlers/game_events/someEventHandler.js'); socket.on('some-event',someEventHandler)); Keeping in mind that the handler would somehow need to access 'socket' and other variables that are outside of the file's scope...Thankful for any tips!Have a nice day

Submitted December 10, 2015 at 09:35PM by DJLaMeche

How I built my static blog engine

http://ift.tt/1N4GRoG

Submitted December 10, 2015 at 07:23PM by qawemlilo

Node.js Tools 1.1 for Visual Studio Released

http://ift.tt/1MZK6M6

Submitted December 10, 2015 at 06:39PM by videoj

Passport Google oauth trouble

I'm very new to Node. I love it so far--I've created a few VERY simple apps, but I'm working on one a bit larger. I want to support user auth with Google (at the very least). Currently, I'm having trouble with the callback. If someone could look over my github repo and give me an idea of where the hell I'm going wrong, I would greatly appreciate it. At this point, I'm not even sure where to turn for the information.

Submitted December 10, 2015 at 05:50PM by my_blue_snog_box

The Node.js way, will save your regional development team from technical debt hell

http://ift.tt/1NIlSJT

Submitted December 10, 2015 at 03:10PM by voxcast

Use LDAP for authentication and authorization in your Node.js Bluemix application

http://ift.tt/1HWDBNn

Submitted December 10, 2015 at 03:22PM by jstuartmill

Why I switched to only NodeJS + npm and stopped using Grunt

http://ift.tt/1HWDzoH

Submitted December 10, 2015 at 03:24PM by jstuartmill

I'm having a difficult understanding exactly what node.js is.

I should start out by saying my background is with LAMP. You have a server constantly running on a computer, serving up webpages whenever requested.With that being said, what is exactly is node? Is it a server? I've started reading some tutorials and I've noticed you can create a server with node, but I'm still not understanding how it works. Does node take the place of Apache or Nginx?

Submitted December 10, 2015 at 02:00PM by wojo1086

Why choose Node.js for web applications?

http://ift.tt/1OjWmXH

Submitted December 10, 2015 at 01:02PM by pingraviraj

[Question] Is Node.js good for news script?

HeyWe are about to starting a business, which is selling news site script. We want to make everything easy and useful for script owners, there is no problem. But we also want to include a drag&drop sidebar in admin panel, so this can be problem in implement phase (because every page has to be static, no ajax).So my question is: should we use nodejs when creating this script? I really want to use Node.js but just because this feature I hope we don't have to choose php.

Submitted December 10, 2015 at 12:15PM by rpe2

Red Hat Pursues Java-Node.js Connection

http://ift.tt/1NWUNVv

Submitted December 10, 2015 at 09:06AM by NinaAnna

How to Deploy a Node.js Application to Elastic Beanstalk with Semaphore - Tutorial

http://ift.tt/1Oi2IXE

Submitted December 10, 2015 at 09:09AM by nikolalsvk

Wednesday 9 December 2015

Como usar OpenCV en Node.js

http://ift.tt/1SPaNXz

Submitted December 10, 2015 at 12:29AM by xavixjf

Union Station ♥ Node.js: request introspection with Passenger 5.0.22

http://ift.tt/1OTy0H3

Submitted December 09, 2015 at 10:25PM by tinco

Building Secure APIs With Express.js

http://ift.tt/1OTTdRc

Submitted December 09, 2015 at 09:17PM by kbarnard10

How to run computationally expensive method in express.js route?

I want to apply some machine learning in a POST route, every time it gets called, and ultimately return the results in the response. A computationally expensive task would be blocking in native node.js correct? Should I spawn python or C code in my route, pass in the arguments, and open competition get the result forwarded backwards? Also, suppose I natively performed the machine learning algorithm in node.js, if that route got hit several times, the computation would truly be separate each time correct?

Submitted December 09, 2015 at 05:39PM by -proof

Intalar Mongoose para Node.js en Ubuntu 14.04

http://ift.tt/1IEReRs

Submitted December 09, 2015 at 05:30PM by xavixjf

Where do you get the documentations in PDF format do ?

I don't have an active connection all the time so I usually save the documentation as a PDF , but this only works if the whole documentation is in a single page ( like Node ). Sometimes even few pages are manageable. But for documentations like of Sequelize , which is page by page topic by topic , it becomes really inconvenient. So I end up downloading the GitHub repo and work with the .MD files. Is there someplace I can get them in one place ? I know of DevDocs - Offline but they require the browser to be open for the whole time. So is there someplace I can get the documentation in one place so I can go through them at my convenience ?

Submitted December 09, 2015 at 05:35PM by abkibaarnsit

Node Steam and HTTP Response

Hello All! I am very very new to streams and even fairly new to node. But i need help with some streams. I am working on a project that uses expressjs and the requestjs lib. I would like to do some translating dto type stuff to send my own scheme to my clients. So I am making a request and wanted to pass the stream to a function of my own and edit the data, then send the writable steam in the response OR create a readable steam with the new data and pipe that to the response.request('url').pipe(myFn).pipe(res); orrequest('url').pipe(myFn) res.send() But I am not sure where my data goes? How to send it to the response? Or even how to really edit the data in a stream then pass it along? Am i using streams wrong? Should i be doing something else?And info will be great!Thanks

Submitted December 09, 2015 at 03:47PM by dignmg

anything similiar to jstack

For java, there's something called jstack where it would print the stacktrace at that instant when you pass in the PID. Is there anything similar for node?

Submitted December 09, 2015 at 04:09PM by darkz999

Postgres and JSON with Node - Hands on with MassiveJS

http://ift.tt/1m8SlPn

Submitted December 09, 2015 at 04:24PM by craig081785

Getting your C++ to the Web with Node.js

http://ift.tt/1YYEtoR

Submitted December 09, 2015 at 02:41PM by jstuartmill

A Reunited Node.js Guns for the Enterprise

http://ift.tt/1M1eV15

Submitted December 09, 2015 at 02:41PM by jstuartmill

IBM Focused on 3 Major Languages: Java, Node.js and Swift

http://ift.tt/1HU2Qjm

Submitted December 09, 2015 at 02:42PM by jstuartmill

Publish npm modules safely and gracefully

http://ift.tt/1maoXZ4

Submitted December 09, 2015 at 02:09PM by inikulin

Thin Controllers in Hapi

http://ift.tt/1XVRBOx

Submitted December 09, 2015 at 01:20PM by thebergamo

Need a little advice with big data...

Hi all,I'm currently working on a project that I'm not sure how best to progress with, in terms of technology and architecture.Ultimately I am developing a project which records a lot of data from an external data stream but also services a REST service that provides analytical data on the data within.During times when a LOT of data is being supplied, the REST service is slow/non-existent and I'm left wondering whether Node/Mongoose, is the best solution for this moving forward.I suspect that running the REST server and data stream process on the same thread/server is probably not the best idea, however would it really solve things by having multiple servers, each handling data, processing and reporting?Any suggestions on how best to handle this?

Submitted December 09, 2015 at 12:24PM by gRoberts84

Tuesday 8 December 2015

Introducing service-checker, a simple module to check if various network services are up and behaving.

http://ift.tt/21NCOoD

Submitted December 09, 2015 at 02:05AM by mrkmg

PHP to Node

I'm working on a web app that should spike interest in a certain community I'm currently still writing in PHP. Servers run Nginx / PHP-FPM. I'm pretty far into it and will check out testing it by third party users in the upcoming week.Would it still be worth it to recode everything and switch to Nginx or go live and if stable start working on an overhaul to nginx but run the PHP version in the meantime?

Submitted December 09, 2015 at 01:24AM by openmid_gg

Is NPM down for you?

when I request it I only getError 503 backend read errorbackend read errorGuru Mediation:Details: cache-fra1226-FRA 1449623210 876771879Varnish cache serverafter few seconds. Anyone knows what is going on?

Submitted December 09, 2015 at 01:07AM by Capaj

Running ES7 with Babel 6

http://ift.tt/1QdOFs4

Submitted December 08, 2015 at 11:04PM by javascripton

Node.js server

Guys I want to start with node.js First I want to do is set up my own node.js server on virtualbox. How I should it done. "Classic" web server is easy. Apache (nginx), php, mysql and I have the basics setup. How it works with node.js. I mean - install only node.js or with nginx.Please give me some hints or some soruces to read. I know that what I'm asking maybe is funny but I'm newbie in programming. I'm doing it just for myself :)

Submitted December 08, 2015 at 09:04PM by vmax96

Apigee, RisingStack and Yahoo Join the Node.js Foundation

http://ift.tt/1Ognqaf

Submitted December 08, 2015 at 07:44PM by gergelyke

Automate GulpJS Tasks during Application Builds

http://ift.tt/1RCCG6W

Submitted December 08, 2015 at 07:28PM by zc824

CodeLobster PHP Edition - Free PHP IDE

http://ift.tt/1XZf7Vs

Submitted December 08, 2015 at 04:20PM by goshams

What is Node? How does Node work? What is Node good for?

http://ift.tt/1jLWkiY

Submitted December 08, 2015 at 03:06PM by a0viedo

Static Code Analysis

Are there any good open-source tools for static analysis of node.js, particularly with a focus on security? Have seen a few that seem to be deprecated, but not much active.

Submitted December 08, 2015 at 02:55PM by bitscraper

Learn Node.js: A Beginner's Guide

http://ift.tt/1jIsdZR

Submitted December 08, 2015 at 02:04PM by wo1fgang

Skeleton for nodejs+angularjs+grunt. Quick guide how to start develop in cloud9 in 5 minutes.

http://ift.tt/1NIrZcY

Submitted December 08, 2015 at 01:36PM by askucher

Queue-Centric Workflow

http://ift.tt/1lr4Khv

Submitted December 08, 2015 at 01:56PM by kostarelo

Hunting a Ghost - Finding a Memory Leak in Node.js

http://ift.tt/1XRS7wZ

Submitted December 08, 2015 at 12:31PM by oroce

Learn React in Baby Steps

http://ift.tt/1IRh1Rh

Submitted December 08, 2015 at 09:43AM by gergelyke

Monday 7 December 2015

Is there an easy way to accept input from users & store in vars in command line apps?

If I wanted to write a coin toss app in the command line, with PHP for example, it would be something like this:echo "Enter Heads or Tails please: "; $chosenSide = fgets(STDIN);And boom, I can work with the $chosenSide variable.Is there anything similar to this? From what i've seen it looks quite painful to get any sort of equivalent with Node.Or would it be easier to just not do command line apps and work straight in the browser? Trying to do "Code challenge" type things that sometimes require users to enter input multiple times.

Submitted December 08, 2015 at 03:32AM by fastpenguin91

I'm a PHP coder and I want to switch to node.js, but I'm finding async a bit of a task to wrap my head around. What can I do about this?

Contemplated making this post for a while and I figured I would do it now.I've wanted to switch to node.js for a long time, for the last 2-3 years at least I've had the thought and made a couple of attempts.However it seems that coming from PHP I'm having a hard time, mainly with wrapping my head around async and callbacks. Not sure how many people her tried PHP but just in case you have not: everything is synchronous. I think this in node.js is referred to as a "blocking" or something.I'm quite lost in how to structure things and mainly how to control the flow of tasks in the order I want. I found just doing a loop with an async task inside ended badly and required a bunch of callbacks and waiting methods and functions to encapsulate the async code to get the result I desired.From what I first read I was scared off, that if you do any synchronous code in a node.js app then it locks up the entire node process and it cant process anything until its finished. Is this true?Ok, tl;dr: I suck at async and callback structuring and task flow management, what can I do about it? :D

Submitted December 08, 2015 at 02:04AM by Linkandzelda

What is the difference between node being asynchronous and node's ability to spawn new processes?

From what I can tell node is designed to be asynchronous. That is the functions are called with callback functions and run in the background. From the manual I saw it said that this meant that it is 'non-blocking'. I've always assumed that this meant that the program is multithreaded and creates a new process to run in the background.So what is the difference between background functions and spawning new processes? Or maybe I'm misunderstanding something.

Submitted December 07, 2015 at 11:53PM by natdanimore

A Painkiller for Isomorphic Data Fetching.

http://ift.tt/1TwOvtC

Submitted December 07, 2015 at 10:35PM by dypo

Best (most elegant and/or modern) solutions for managing docker from within NodeJS?

One of the ways that I'm able to do this is through Ansible. And this is definitely a sound option, but it involves more overhead and more time. Are there some elegant ways to orchestrate docker containers through NodeJS? What about simply using bash? Do bash callbacks in Node only finish once the action is finished? E.g. if I built a container, received a bash callback in Node and stderr was empty, does this now mean the container is running? (Though I'm aware I can also check by running 'docker ps', but just curious about the semantics

Submitted December 07, 2015 at 09:29PM by SomeRandomBuddy

New node.js client for accessing gene variant information for bioinformatics pipelines

http://ift.tt/1TwzZ56

Submitted December 07, 2015 at 08:38PM by g_g_t

Recommendation for message queue technology?

I believe I am in need a message queuing solution. My node.js app will need to call an external webhook when we save data to push changes from our database to another database (owned by another company). I am thinking a I need a message queue to do this.Can anyone recommend a message queuing solution that will play nicely with node.js?I currently use redis as pub/sub in my app, so maybe I can leverage redis for this? What happens if there are 100 messages added to the queue and I need to restart redis for some reason? I do not want to lose the messages in my queue if I have to restart. I do not think I want to use a database as the queue, but only because someone recommended against the db as a queue approach.In ASP.NET, I would use Azure Service Bus, but in node.js, I am not sure what to use. Any recommendations?Thanks!

Submitted December 07, 2015 at 08:36PM by mule52

Just arrived in Portland for Node Interactive

Anyone else here already? It'd be great to get a group together to grab a drink and some video games tonight at Ground Kontrol.

Submitted December 07, 2015 at 06:43PM by matthova

How best to test projects

I come from a Java background, where we write unit tests for all of our code, integration tests for all of our applications, and verification tests for everything too. (Integration tests are build time tests, where the dependent services are mocked out. Verification tests instead run against a live service with all dependencies running live too). This involves a lot of work with various test frameworks, mocking frameworks, and makes a lot of use of the IoC container.Every time I try to write any larger scale node apps, I always end up trying to reproduce this level of testing, and I always end up getting put off because it just doesn't work. The lack of good support for IoC alone makes it hard to do a lot of this.However, I do like node, and I do keep coming back to it. And the fact that a lot of people have a lot of success with it obviously means that it can work, so what am I doing wrong? Am I just trying too hard for my test coverage? Or is there something I'm missing in my aim to have a build that is probably working correctly?

Submitted December 07, 2015 at 03:42PM by sazzer

parse5 v2.0.0 has been released: streaming support, enhanced location info and more.

http://ift.tt/1dxwHhE

Submitted December 07, 2015 at 01:41PM by inikulin

How to stay up to date with dependencies?

Hi guys!I'm curious on your best practice(process) to stay up to date with all the dependencies that tend to mount up in larger' projects when there's more than one working on the project.Thank you!

Submitted December 07, 2015 at 01:08PM by jsjuniorlad

Security - Popular npm packages exposed credentials

http://ift.tt/1NLDWF7

Submitted December 07, 2015 at 01:13PM by Aurelsicoko

NodeJS: an auto-generated staging server for every PR with all production data

http://ift.tt/1m6LvK8

Submitted December 07, 2015 at 01:03PM by OriPekelman

How test your Hapi API with Lab

http://ift.tt/1R4Rzj6

Submitted December 07, 2015 at 12:29PM by thebergamo

Sunday 6 December 2015

New Sessions isn't being set when new user goes on page?

Hi!I am working on a node project for the past few weeks and I need the ability for users to login. In PHP I have always used $_SESSION for this so this is why I have assumed that node.js have the same functionality. I have been following this tutorial: http://ift.tt/1SIkB5B haven't noticed the problem until now because I put the app on heroku and I noticed that when I was logged in on one computer and went on another computer and visited the website, I was still logged in into the original users account!Here is the code for the node.js file: http://ift.tt/1Qa2WWB think the problem has to do with the middleware from line 109 to 119:app.all("*", function (req, res, next) { sess = req.session; //Create session variable on ALL pages if (sess.user) { app.locals.signedYesOrNo = sess.user; } else { } next(); //Passes on to the next router }); This is the only thing I have changed from the tutorial as instead of writing sess = req.session on EVERY router I just put it into this middleware.Any help will be greatly appreciated!

Submitted December 07, 2015 at 07:23AM by mre12345

Simplified Control Flow in Node.js

http://ift.tt/1RYjUVh

Submitted December 07, 2015 at 04:40AM by goshams

P2P Proxy Network ideal for Cherio, Requests, Scraping/Crawling, node-crawler, node-simplecrawler & more

http://ift.tt/1TQQGcs

Submitted December 07, 2015 at 03:48AM by bstcoder4life

Read the UNIX Utility Conventions and wrote an obedient tiny CLI parser

http://ift.tt/1e2OGOQ

Submitted December 07, 2015 at 02:19AM by bucaran

Need some feedback on my newest package!

I have created swig-minifier a couple of days ago and i'm interested in some feedback on the code, workflow and efficiencyI tried to be as efficient as I could be, this was my first time trying to create a cache and minify system based on html contents.It only works with expressjs.If you could check it out and give some feedback it would be great :) Here is the package: http://ift.tt/1XNsAVy here is the main app.js file for the module: http://ift.tt/1TQ5HLz I would love to have all you guys on twitter, please send me a follow and I will follow back :D https://twitter.com/Mdghruut

Submitted December 06, 2015 at 11:06PM by Givemeallyourcats

Configure a telegram bot webhook into an existing express app

http://ift.tt/1R3HdzM

Submitted December 06, 2015 at 11:20PM by valipour

Hey Devs! Need your help with our research! You can win prizes too! Giving away Nexus6, Nexus Player, Amazon Echo, iPhone 6S, Parrot AR Drone 2.0, a Sony Xperia Z5, MS Surface, BlackBerry Passport, AWS Voucher, Amazon Gift Card and much more. [1 Day Left]

http://ift.tt/1HG3gK9

Submitted December 06, 2015 at 09:55PM by bling1bling

How do I use data passed from Node to React?

I don't really understand how to use the data I send from my res.render in react.I have my function, something like..res.render('index', { items: Object }); Then I'm using this.props.items, which I think is correct.The problem I'm having is I don't know how to access the objects, or loop through them.

Submitted December 06, 2015 at 03:59PM by scottcfr

Raspberry Node

http://ift.tt/1OGyfXW

Submitted December 06, 2015 at 02:55PM by jstuartmill

Time to update: December Security Release Summary

http://ift.tt/1O6OpFd

Submitted December 06, 2015 at 01:43PM by bobbykostadinov

How to Install Node.js

http://ift.tt/1TNLNRx

Submitted December 06, 2015 at 09:31AM by FreeWebTutorials

Friday 4 December 2015

How to use Hapi Decorate

http://ift.tt/1HLoCFW

Submitted December 04, 2015 at 06:40PM by thebergamo

[WIP] RTCPeerConnection

http://ift.tt/1Nuo0F0

Submitted December 04, 2015 at 06:14PM by nickdesaulniers

Need help watching with nodemon and npm

http://ift.tt/1XO7DEE

Submitted December 04, 2015 at 06:21PM by crisprcas9

Trying to learn node: which books are too old to learn from in 2015?

I am quite familiar with Javascript, so last week started learning http://nodeschool.io/ However, as I want to dig deeper, I looking to read some kind of book. What is your recomendations in 2015? Btw, maybe you can suggest other node.js learning resources?

Submitted December 04, 2015 at 04:21PM by Gruzdaz

Top 100 Node.Js Frameworks

http://ift.tt/1Rt4BGq

Submitted December 04, 2015 at 01:49PM by FreeWebTutorials

Nodevember: npm and soa by seldo

http://ift.tt/1NJA4UU

Submitted December 04, 2015 at 12:48PM by kostarelo

Into the npm installer -- How it works and where it's complex

https://www.youtube.com/watch?v=3ShkpzavVFM

Submitted December 04, 2015 at 12:48PM by kostarelo

Top 100 Node.Js Frameworks

We have found a great number of node.js frameworks out there. If you would like to use node.js framework, here is a complete list of frameworks available right now:http://ift.tt/1Rt4BGq

Submitted December 04, 2015 at 01:04PM by FreeWebTutorials

Let asynchronous I/O happen by returning control back to the event loop

http://ift.tt/1lAYQdc

Submitted December 04, 2015 at 10:31AM by bytearcher

Thursday 3 December 2015

feross/webtorrent - Streaming torrent client for node & the browser

http://ift.tt/18u7yjk

Submitted December 04, 2015 at 07:28AM by bigflagellum

The Obligatory "Flame War" Phoenix vs Node.js

http://ift.tt/1jAASxl

Submitted December 04, 2015 at 04:13AM by jstuartmill

I have a node repo with 91 stars and I am embarrassed at how much this affects my sense of self-worth

The repo isn't even written in node, it is node-reinstall and it is written in bash. It is my only repo with more than a handful of stars, but it is kind of embarrassing how often I check the page to see if my count has gone up. But damnit if I don't feel like Zuckerberg.

Submitted December 04, 2015 at 01:05AM by brockangelo

Two Factor Auth with Node.js and Yubikey

http://ift.tt/1OAVDWA

Submitted December 04, 2015 at 12:36AM by rdegges

What are you thinking about Sails/Waterline?

I'm a huge fan of Sails, I love the approach about API centric and I think this a very powerful Node.js framework. However, for some months the framework is no longer maintained... The number of issues and PRs is growing up but nobody is doing anything about it. Moreover several major Waterline's adapters are broken (sails-mongo, sails-arangodb, etc). I feel that the Sails stack is dying or is experiencing a difficult situation.I'm very interested about what are you feelings about those things?

Submitted December 03, 2015 at 11:00PM by Aurelsicoko

In Ruby on Rails the View/UI is able to be rendered once per controller action, is NodeJS able to provide a more fluid way to (re-)render templates?

Title kind of says it, sorry if this is really ignorant of how Node works, I haven't "really" done anything with it yet...

Submitted December 03, 2015 at 10:41PM by warzone2222

Advice on larger application

Setting out to build my first large scale application in node. The project is a website and the target to reach some 200.000 users in two years.So far I only build applications that used mongoose and passport for authentication building upon express.For this project I want to get things right from the beginning. My question is what do I need to keep in mind when developing for a large userbase?

Submitted December 03, 2015 at 10:02PM by HoverBaum

Check your environmental variables with `checkenv`

http://ift.tt/1QWXOoS

Submitted December 03, 2015 at 08:53PM by inxilpro

Poll: What is your Node.js IDE of choice, after the WebStorm controversial license change?

No text found

Submitted December 03, 2015 at 07:13PM by andrerpena

npm for Bitbucket

http://ift.tt/1XCCRnu

Submitted December 03, 2015 at 07:02PM by kannonboy

Top Node metrics to watch

http://ift.tt/1SIBtcd

Submitted December 03, 2015 at 06:32PM by a0viedo

How Node.js Powers the Many User Interfaces of Netflix

http://ift.tt/1lyJRAg

Submitted December 03, 2015 at 06:33PM by a0viedo

Missing Data with net

FrostWire's JLibtorrent project has started bringing libtorrent to Node, Help needed.

https://twitter.com/frostwire/status/672453101614428161

Submitted December 03, 2015 at 04:33PM by gubatron

DevOps - Cross Platform build automation for NodeJS, Java and .NET in 15 minutes

http://ift.tt/1TmQ2Tf

Submitted December 03, 2015 at 11:19AM by punitganshani

[Question] NewRelic and NodeJS

What are your experiences? I had to manually manage it's dependencies several times or completely remove their package to get my app running again. Perhaps any of you have a good grasp of using their provided node package?

Submitted December 03, 2015 at 08:39AM by GoutMaximum

Wednesday 2 December 2015

CodexD - Filesystem snapshotting and replication

CodexD is an open source filesystem snapshot / restore layer implemented in node. It is the underlying storage engine for ContainerShip (also open source and node). CodexD is still under active development and looking for thoughts & contributors!For a demo of CodexD in action: codexd demo - redis migration

Submitted December 03, 2015 at 05:45AM by normanjoyner

Documentation for HTTP requests of the form /something/:name mean?[express.js]

I think I have an idea what this is doing:app.get('/user/:id', function(req, res) { userid = req.params.id; }); It is looking for a get request where the first part of the path is 'user' and the second part is available as the 'id' parameter.My question is, where is this functionality defined? In express or as part of the HTML protocol? And can you send me the documentation of where this feature.Please and thank you.

Submitted December 03, 2015 at 03:45AM by natdanimore

Node.js async order (Help)

http://ift.tt/1l9EI2f

Submitted December 03, 2015 at 01:03AM by laraveling

Made with Node: License Injector - a VS Code extension

http://ift.tt/1XzPos0

Submitted December 02, 2015 at 11:48PM by BBQLays

5 Best Books to Learn Node.js Effectively

http://ift.tt/21wgJLd

Submitted December 02, 2015 at 10:45PM by FreeWebTutorials

Code Review - 1st time trying node out, want to make sure I'm doing it right!

Hi I recently started a Node project to make a text based RPG, being my 1st ever node project I'm wondering if I could get a code review on some of the things I have done.I'm unsure of the best practices, architecture structure etc for node.One of the main files I want looked at is this one(most of the code so far is here): http://ift.tt/1Q1tFVs feel like it's starting to get hard to read especially the function characterCreation(stage) looks a bit spaghetti like.I look forward to the pro tips / recommendations :)Thanks.

Submitted December 02, 2015 at 11:01PM by lrk89

using alt for isomorphic application, poor documentation on Snapshot and Bootstrap. how to get the snapshot to the client?

I'm trying to figure out the best way to get my snapshot to the client in order to run bootstrap.Using the whole kit, react, alt, node, etc Passing the information to the Route doesn't do squat because I'm rendering the application server side to display it... and then the client side loads and has a fit because it doesn't match what the server sent.Is there a way to pass the snapshot to the client App component to run the bootstrap prior to "taking over" and causing a stutter?I tried passing it over as a prop in the routes, and that only works on the server, the prop value is "undefined" client side.At this rate I'm concerned that I'll have to just run a call to the server to get the snapshot.

Submitted December 02, 2015 at 10:08PM by thrownaway21

Gen Info. Rep your local node school and meetup

Purpose of this post is to expose new people to nodeschool. A national node community with a bunch of local chapters to help all levels of noders to better understand node. I'm apart of the Austin chapter. Any other chapters out there. Any one who doesn't know of nodeschool.io ? Check it out maybe there's a chapter near you, if not you could start one.

Submitted December 02, 2015 at 06:18PM by TheOneRavenous

Presentation Recording: Scaling Node.js with Docker and Kubernetes

http://ift.tt/1QeWjRn

Submitted December 02, 2015 at 06:20PM by markmandel

Web scraper starter project

I've been working on a few web scrapers lately and I have found a structure that has served me well. I've decided to create and share a scraper starter repo that can be cloned and modified for each new project.There are loads of tutorials out there for how to build a web scraper, but if you're past that, are familiar with Node or Javascript and want a modular structure to scrape multiple sources for similar data, this is for you.It uses Request for making the HTTP calls to each website, Cheerio for parsing the returned HTML, and saves the scraped data in MongoDB. I'm new to MongoDB and was surprised that their examples were a mess of callbacks so I pieced together the best structure I could for my limited use but if you know of good patterns for using Mongo, I'd love to know.

Submitted December 02, 2015 at 05:44PM by spetsnaz8

Quick thing I put together for fun with socket.io, node, and pixi

Wanted to see how fast I could put something together and how I could harvest the power of websockets. I put this together in a few hours. It's real time, so if you're playing against someone it should be pretty accurate (if not a big buggy :] - a few hours remember). Thought I'd share, I'm sure someone will find it funny.http://ift.tt/1NpPefW. I'm not an artist.P.S.S. Tips for high performance socket.io websockets and other innovative uses welcome :)

Submitted December 02, 2015 at 04:13PM by professionalcritique

Developer Economics is giving away an iPhone 6S, a Sony Xperia Z5, MS Surface Tablet, BlackBerry Passport, Nexus Player, Amazon Echo, Parrot AR Drone, Aquaris E5, AWS and Udemy Vouchers, and much more at new National Trends Survey for developers.

http://ift.tt/1XywrFT

Submitted December 02, 2015 at 03:45PM by mobdevintown

Problems With Node.JS Event Loop

http://ift.tt/1lvKJG7

Submitted December 02, 2015 at 03:23PM by jstuartmill

TUTORIAL – Building a Conferencing Calling App in Node.js & Express and Sinch

http://ift.tt/1Rmeupg

Submitted December 02, 2015 at 12:39PM by sinchdev

How developers see WordPress move to Node.js?

PHP was the core language for WordPress over the years. How do you guys see the change and how it will shape up the 25% of web WordPress has?

Submitted December 02, 2015 at 11:15AM by isabelle_steele

Tuesday 1 December 2015

Shinobi Showdown - I made this in a few hours. Just wanted to showcase some node/socket.io fun :) [slightly nsfw]

Wanted to see how fast I could put something together and how I could harvest the power of websockets. I put this together in a few hours. It's real time, so if you're playing against someone it should be pretty accurate (if not a big buggy :] - a few hours remember). Thought I'd share, I'm sure someone will find it funny.http://ift.tt/1NpPefW. I'm not an artist.P.S.S. Tips for high performance socket.io websockets and other innovative uses welcome :)

Submitted December 02, 2015 at 07:32AM by professionalcritique

send json to android device by bluetooth from node

Are there any packages for easily archiving this?

Submitted December 02, 2015 at 06:07AM by ewnd9

is this possible with node js? (noob question)

Ok, I've done a lot of searching a reading online, and am still kind of confused. I essentially have a question that has a yes or no answer. Hopefully someone here can be of some help :d)I have an iPhone app. The app is fully interactive, and uses Parse as its backend. Users can submit content, and then other users can immediately view that content. people can send friend requests, etc. It is all built and ready to be shipped to the App store now.I want to make a website that contains most (not all, most) of the functionality of the app, where users submit data to Parse, and then other users can immediately see the changes. I need this to be a multi page application, not single page. I need custom URLs to be generated based on the custom content. For example, a user clicks on an activity entitled "Activity 1", and then it takes you to http://ift.tt/1Io1Wvt, like is possible with a ruby on rails type application. I need a way to pass data (strings) from one view to the next. Basically, I need a site that is very similar to eventbrite.com in its function.Is that the type of thing that is possible to do with node js and express js ? I read this : http://ift.tt/1JPQPv0 and it makes it seem like it is (but doesn't explicitly say so) but I just need to get some confirmation first. I don't know any javascript (so still need to learn that before even starting node/express) and want to know that what I want to achieve with node/express is possible before I dive in and potentially waste a lot of time.thanks!

Submitted December 02, 2015 at 04:44AM by my_third_throwaway_n

Node.js: Annotated Tutorial

http://ift.tt/1YGv0CF

Submitted December 02, 2015 at 04:36AM by martinchavez

[Question] Node Tools for Visual Studio - No .load?

So, being used to doing light work with Node and very much adopting the "Code by Exploration" workflow that Python spoiled me with, I made liberal use of the .load [filename] command in the node REPL. I have VS for other projects and decided to explore NTVS to help organize the chaos among other things. I noticed the VS "Interactive Window" REPL has a subset of metacommands and does not list or accept .load. I checked to see if NTVS installed an old node instead of finding my provided one, but that's not the case.So what's the deal? Will I have to work with an external instance and play in my sandbox there?

Submitted December 02, 2015 at 04:10AM by Buckshot_Mouthwash

Avoiding the California DMV with NodeJS

http://ift.tt/1TsHhrc

Submitted December 01, 2015 at 11:52PM by mvartan

[Question] Video Steaming with NodeJS

Does anyone here has the experience of developing a service to allow users to video-steam thier presentation. Let's say that you wanna build a feature in ustream.tv where any body can video-stream and build his own channel, what do I need to know in order to build something similar ?, what libraries that I can use to make it easy ? what pipeline do you suggest ? any ideas are welcomed

Submitted December 01, 2015 at 10:07PM by __Julia

Looking for a NodeJS developer [PAID]

Hello, I am a front-end developer looking for a NodeJS developer for back end functionality for a Counter-Strike:Global Offensive betting website. Payment will be discussed. Please PM if you are interested with a portfolio/previous work if possible.Should be experienced in: NodeJS MySQL (or other DB) SteamAPI JSThanks.

Submitted December 01, 2015 at 10:26PM by Wisdomia

Mongoose & Connection Pool Sharing

I'm having a hard time figuring out how to use connection pool sharing properly.Folder structure is:bin/config/models/public/routes/src/views/app.jsSome of my relevant files for my problem are:app.jsRoutes:modelModels:modelaccountMongo Config:configIn my mongo config file, if I change the db option to whichever database I'm querying, it works for that database, but not the other.For example, I have some dummy data in a database named dummy. If I go to localhost/dummy, the data is shown. But if I change the db option to users and go to localhost/dummy, all I get is [].For my setup, how do I tell Mongoose to use the appropriate database for each Schema?

Submitted December 01, 2015 at 06:25PM by krypt_o

I just published a module to test NODE_ENV variable by using strings/regexp, I would like you to give opinions/suggestions/improvements.

http://ift.tt/1YFfruQ

Submitted December 01, 2015 at 05:51PM by h4t0n

Node.js Architecture

Hi guys, There are lot of good texts about usage and development in Node.js. However, it's harder to find good documentation or texts regarding architecture of Node.js itself. Can you help me to learn more about it?What libraries does Node.js use and how does it interact with them? How do its various modules interact with each other? What is structure of Node.js, is there any up-to-date component diagram? Or class diagram or any other type? Which design patterns have been used in Node?I believe I am not the only one, who would like to know more about architecture of Node.js and I would really appreciate if you tell me something about it or point me to some good resources.

Submitted December 01, 2015 at 01:36PM by questionForNodeJs

Simple Text to Speech Application in Node.js

http://ift.tt/1GtosSZ

Submitted December 01, 2015 at 12:32PM by goshams

I can build a rest api, how can I authenticate users?

I have built a basic REST API using Express, now I have no clue how can I authenticate users. I want my users to have different roles and permissions based on those roles, what is the best way to approach this problem given that I can't store state on the server according to the REST principles?

Submitted December 01, 2015 at 12:00PM by segmentationfaulter

koa + babel + gulp + angular: a yeoman generator

http://ift.tt/1lrLgIQ

Submitted December 01, 2015 at 09:37AM by a_shed_of_tools

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