NodeJs Application Structure

In this post I will show how I organize my node.js applications. I’ll start explaning the nodejs principles, with examples.

NodeJs Principles

NodeJs follows the next principles:

Unix philosophy

  • “Small is beautiful”
  • “Make each program do one thing well”

Keep It Simple, Stupid (KISS) principle.

“Simplicity is the ultimate sophistication.” – Leonardo da Vinci

I think I already gave the idea of the way to structuring a node application. Creating microservices to do specific work, separating the complexity and decoupling the responsibilities.

One of the biggest problems that people have with Nodejs is the maintainability of the application. That’s the reason why is better to have 3 different micro applications than a big one.

Continue reading NodeJs Application Structure

NodeJs Tips

I started developing in Node Js 8 months ago and at the beginning I wish to know everything that I know today. With this post I want to share some tips and good practices that I learned.

Use Strict

“use strict” was introduced in Javascript 5, you should use it when you are writing javascript code in Client (Browser) or Server Side (NodeJs) ALWAYS!!! To change the compiler to strict mode it’s only necessary to write “use strict”; and the compiler will automatically change to strict mode.

Continue reading NodeJs Tips