New AdonisJS Tools: FlyDrive, Transmit, Health Checks & More!

proflie

appstonelab

blog-image

AdonisJS continues to evolve, bringing powerful Node.js framework alternative to Laravel framework of PHP and utilities to enhance your development experience. In this update, they introduce a variety of exciting packages that you can start using today to simplify file storage, broadcasting events, debugging, and more. Here’s a quick look at the latest additions to the AdonisJS ecosystem:

1. FlyDrive – A File Storage Library for Node.js

In earlier versions of AdonisJS, the Drive module was tightly coupled with the framework. However, we’ve made strides toward decoupling it, turning it into a framework-agnostic library called FlyDrive. Now, you can use FlyDrive independently of AdonisJS or benefit from the thin AdonisJS wrapper we’ve created on top of it.

FlyDrive offers a consistent API for managing user uploaded files across various storage services, including S3, Google Cloud Storage, Cloudflare R2 and even your local file system. Whether you’re working with cloud providers or managing files on your server, FlyDrive simplifies the file handling process.

2. Transmit – Realtime Broadcasting Using SSE

Building real-time applications doesn’t have to be complicated. With Transmit, you can use Server-Sent Events (SSE) to broadcast updates from your server to clients, making real-time communication easy without the need for WebSockets.

Transmit also includes a sync engine to broadcast events from multiple processes, such as broadcasting events from a Queue worker when a job is completed. This streamlines real-time broadcasting for applications that scale across multiple processes.

3. Health Checks in AdonisJS v6

Monitoring the health of your application is crucial for reliability. In AdonisJS v6, Health Checks have been added as a core feature of the framework. This allows you to register various checks and expose the results through an HTTP endpoint.

These health checks help ensure your app’s components (such as the database, cache, or external APIs) are functioning correctly.

4. Dump and Die (dd) for Debugging

Debugging can often be tedious, but Dump and Die (dd) offers a more developer-friendly way to print JavaScript data types just like laravel framework dd() function. Think of it as an upgraded version of console.log. With dd, you get more than just output – it shows the exact file and line number where the log was triggered. Plus, it includes an HTML viewer, making it easy to view and navigate through nested data in your browser.

5. Defer – In-Memory Background Queue

Defer is an in-memory background queue that allows you to run asynchronous tasks in the background. Think of it as an enhanced setImmediate that supports monitoring, error handling and graceful shutdown. It’s perfect for handling non-critical background tasks like refreshing cached content or cleaning up expired data without disrupting the user experience.

6. New Splash Screen for AdonisJS

When you create a new AdonisJS application, you’ll now be greeted with a beautiful splash screen. Designed by Estéban (a fellow AdonisJS enthusiast), this new splash screen is built using TailwindCSS and provides a fresh, modern feel to your development experience.

Check out the new splash screen in action by running the dev server of a fresh AdonisJS project.

These new tools and updates are designed to make your experience with AdonisJS even more powerful and enjoyable. Whether you’re handling files, broadcasting real-time events or debugging, these packages provide streamlined, efficient solutions for common challenges. Dive into the docs and give them a try in your next project!

Related Blogs

Human Resources

5 Tips for Managing Diversity in the Workplace
proflie

appstonelab

blog-img

Web Development

Getting started with Tailwind CSS
proflie

appstonelab

blog-img

SaaSWeb Development

What is SEO(Search Engine Optimization)?
proflie

appstonelab

blog-img