blog.pleb.in

Life of Apps

Showing posts with label bookmark. Show all posts
Showing posts with label bookmark. Show all posts

Node.js Utility Modules & Configuration

As I learn and understand Node.js better, I try to organize the code better. Some of the changes that I did to the code that does microservices orchestration are:

  • Organized helper code for RabbitMQ and HTTP methods into a separate module by following this useful article
  • Moved the URL details for RabbitMQ to a separate js file following this stackoverflow response
  • Closed RabbitMQ connections on process exit trapping kill & Ctrl-C signals using the morbidly titled npm module called death