The Best Kept Secret of Express.JS
--
Have you ever spent more than ten minutes debugging any particular express.js error?😰
If so, you’re in the right spot ✅. But before we jump into the secret application🤫 that can save you hours each week and plenty of headaches, let’s take a brief walk through time, shall we? 🕑🚶♂️
📝 A brief history on Node js:
The time was 2008, AJAX had just been gaining in popularity and with that, a new level of interactivity across the web. At this time Ryan Dahl(creator of Node.js) had become fascinated by one particular implementation being made…the animated loading bar 🤨.
Prior to the AJAX method, you would have to write a custom GUI application to upload a file and achieve the same level of interactivity. Using the AJAX method on the interactive loading bar, you have to constantly hit the server with AJAX requests. Ryan knew there was a better way and set out to stake his claim in modern day web technologies. His vision included a non-blocking single threaded🪡 system that would provide a way to build scalable network applications.
At this time, Ryan was attempting to build Node using Ruby On Rails but had a few setbacks due to Ruby’s absence of parallel execution. Ryan was having lunch with a friend one day🙇🌮, when he decided on using javascript. This was probably influenced by google’s V8 engine released a few months earlier in September of 2008 that had also been built using javascript. Rumor has it that there may have been a few drinks🍻 involved at that lunch because we somehow ended up with package.json too 😑, but that neither here or there 🤷♂️.
The idea behind Node.js was so that developers can create server-side web applications without having to worry about a back end languages since developers can use JavaScript on both the server and the client side. Node.js was able to create a fast, data-intensive, real-time application due to its asynchronous event loop🔁. Node.js has since been used for websites, data logging, chat applications, and other applications.
📝 A brief history on Express.js:
Later that year, 🌟TJ Hollowaychuk🌟 (a legend in the node community) and Jafar Husain collaborated to create Express.js. Express.js is a web framework for Node.js that provides a set of features that allow developers to make a server-side web application. Node.js was very useful but still required developers to use a back-end language. Express.js was created to make Node.js more accessible and lower the barrier to entry for developers by providing a set of features such as routing, handling the HTTP requests, and templates.
The main benefits of using Express js:
When express.js initially launched🚀 it quickly gained momentum📈 largely due to the expanding Node community and accompanying benefits. The two benefits that trump the list are the simplicity and performance🏎 of the framework. Express came jam-packed with pre-written middleware functions for rapid prototyping and development but also made it easy to write your own custom middeware or template engines if needed. Express is lightweight🪶 and modular, allowing you to only use the parts that you need.
You might be thinking…”It sounds like express has it all, so why am I here, and what is the secret?”🤔
The Best Kept Secret Is… the Launch of Our New Open-Source Express Visual Dashboard/Debugger — ObServer.
(shameless plug🤷♂️, but you’ll thank me later😏)
Express made node easier to use, no doubt about it. But that doesn’t mean there aren’t improvements to be made. We don’t mean improvements with the framework itself but tools that make it easier to use express like ObServer.
If you have ever built a large scale application utilizing express.js you should know that sometimes even the most experienced developers can get caught in a labyrinth of routes and middleware🥴, providing specific challenges when it comes to debugging.
If you are a highly visual person, like myself, or just try to maximize your work efficiency and reduce the amount of headaches🙅♂️🤕 you encounter, then you will appreciate this application.
You can add ObServer in less than 5 minutes with these 3️⃣ easy steps‼️
- npm install express-observer
- Change require(‘express’) to require(‘express-observer’) in your server file(s).
- Download the desktop application and run your code 🤗🙌
Want to take your open-source game to the next level?🏆
➡️ Apply Here to become an ObServer contributor.
Find us on GitHub — -> https://github.com/oslabs-beta/obServerJS