background preloader

NodeJS

Facebook Twitter

Top 10 Mistakes Node.js Developers Make. How To Use Mocha With Node.js For Test-Driven Development to Avoid Pain and Ship Products Faster. UPDATE: Want to learn Node.js, Express.js, MongoDB, Meteor and React.js but never have time? Join us over the weekend of March 12-13 in New York City, NY for two-day Node+React course. Test-driven development (TDD) , as many of you might know, is one of the main, agile development techniques. The genius of TDD lies in increased quality of code, faster development resulting from greater programmer confidence, and improved bug detection (duh!). Historically, web apps have been hard to autotest, and developers relied heavily on manual testing. But, certain parts such as standalone services and REST API can be and should be tested thoroughly by the TDD. At the same time, rich user interface (UI) / user experience (UX) can be tested with headless browsers such as PhantomJS.

The behavior-driven development (BDD) concept is based on TDD. Similar to building apps themselves, most of the time software engineers should use a testing framework. Installing and Understanding Mocha $ . Figure 3–1. Comprendre et maîtriser npm - Introduction - Maxlab.

Npm est désormais incontournable pour les développeurs javascript . Apparu avec node.js en 2009 son usage dépasse aujourd’hui l’environnement serveur. Il est de plus en plus utilisé pour des applications front et son usage comme outil de développement devient quasi systématique. De plus il reste simple et permet d’accéder au plus gros dépôt de paquets tout langages confondus. Simple mais extrêmement puissant ! Dans cette série d’articles nous verrons dans un premier temps comment prendre en main npm puis après quelques astuces utiles aux débutants et confirmés nous irons un peu plus loin en l’utilisant comme système de build à part entière et en créant nos propres paquets pour la plateforme . Installation Pas besoin ici de grandes explications, npm est fourni lors de l’installation de node.js / io.js . Dès lors que vous avez configuré votre PATH correctement, c’est à dire pointant vers l’exécutable de npm qui se trouve en principe avec celui de node.js, vous pouvez suivre ce qui suit. 1.

10 weeks of node.js after 10 years of PHP — Unexpected Token. A couple of months ago I started a new startup project at eFounders startup studio. I had been developing web applications using PHP for 10 years. I felt it was finally time to change my habits and to choose a more modern approach for developing them. I ditched PHP and started playing with the cool kids (no offense, PHP). This article tells you about my personal takeaways of this experience. TL;DR; The switch was actually not that difficult for me as I was used to the paradigm of having a rich client and the server providing a slim JSON interface. The biggest gain for me is productivity. Javascript syntax is not what makes Node.js better than PHP In my opinion, your first steps with node.js will depend heavily on what you did before. I tried both approaches. How I did things before on the server with PHP and the Laravel framework: And how I do the same thing now with node.js, Express and mongoose Async is your new best friend node.js’ package manager NPM proves the power of the Community.