Tuesday, 2 May 2017

Having difficulty with xml2js on Xml->Json->Xml in NodeJS

I want to parse xml, convert it to json, edit the string and then convert it to Xml. So far i've managed to parse xml file with xml2js module, change it to json, find and replace the string, but when i tried to convert it back to xml with buildObject() it will convert to incorrect Xml format.This is my current code: http://ift.tt/2psX7vN is my unchanged xml: http://ift.tt/2quHvpI is my changed xml: http://ift.tt/2psWvWN is what i need: http://ift.tt/2quzuRM tip/help is more than welcome

Submitted May 02, 2017 at 05:30PM by When_The_Dank_Hits

Mastering the Node.js File System & the fs module

http://ift.tt/2p1C0wT

Submitted May 02, 2017 at 02:08PM by hfeeri

Simple HTTP benchmark for popular nodejs frameworks using wrk

http://ift.tt/2pDrgsL

Submitted May 02, 2017 at 10:47AM by hbakhtiyor

What's the difference between a web framework and a web api framework in node?

I've been checking out solutions for building apps with Node. While researching this, I've been getting hits with some calling themselves web frameworks and others web API frameworks. For example, Apigee-127, Swagger, Express, Sails, Restify and Hapi.So, about the differences between these frameworks. Is it that web API frameworks use RESTful endpoints to return JSON content for a frontend (like VueJS or AngularJS) to render on the client, and web frameworks don't have those tools built-in?Thanks.

Submitted May 02, 2017 at 11:25AM by aRegularFarmChicken

Memory sharing using cluster / fork

Hello everyone,I've created this project yesterday, there's still a lot of commands missing: http://ift.tt/2pD9buJ wanted to hear the thoughts from the community. I've got surprised that I couldn't find anything like this when searching for memory sharing in a clustered environment. Then I thought I could be crazy for doing so.Any feedback is appreciated. Thanks

Submitted May 02, 2017 at 09:43AM by endel

Cluster or multiple small servers?

Hi allI am building a product which receives large amounts of traffic data. (Imagine if Reddit was sending some traffic data about each visitor to a server.)I have a node app which receives the traffic and puts it into a RabbitMQ queue for later processing.I am considering the following setup:1 x load balancer10+ x single core servers running my node appSo the idea is the load balancer receives a large amount of traffic, and spreads the load amongst the 10 node servers.I'm wondering though if I'm overcomplicating things.Would it make more sense to do something like this:1 x load balancer2 x multi-core servers running my node app using a cluster (i.e. master + multiple workers).Is there a best practice for this?Your advice is greatly appreciated.Thanks!

Submitted May 02, 2017 at 09:36AM by just_tech_stuff

Monday, 1 May 2017

Newbie Question, clarificaiton on -g prefix

I've read the documentation and I know it means global. But I'm not sure how it works. Let's say I have a current directory path of: C:\Users\Owner\Downloads\new-project1and I used the command:npm istall -g expressWould -g install npm=express at the parent directory of the current path? so Downloads? Double checking since I can't seem to find it in Downloads.Documentation:http://ift.tt/1M39bVx

Submitted May 02, 2017 at 03:59AM by badboyzpwns