Introduction

Why Sails?

Summary

In this discussion, Kelvin explains why Sails is at the core of The Boring JavaScript Stack. He highlights its feature completeness, stability, and alignment with JavaScript and Node.js. Unlike other frameworks, Sails comes with built-in authentication, authorization, a robust ORM (Waterline), real-time WebSocket support, seamless file uploads, shell scripting for jobs, and email functionality.

These features eliminate the need to reinvent the wheel, allowing developers to focus on building their applications rather than configuring complex infrastructure. The simplicity and reliability of Sails make it ideal for ambitious developers who want to ship fast while maintaining a solid, battle-tested backend.

Transcript

Why Sails?

Okay, so I get asked ever so often, "Kelvin, why Sails? Why not something modern?" And I feel that at the ethos of the stack, Sails is really what makes it boring in the best way possible. Every other thing out there that I've seen doesn't really have as much built-in as Sails does, or they don’t embrace the ethos of JavaScript and Node.js as deeply.

Sails is at the core of The Boring Stack, and it’s a web framework in the vein of Laravel or Rails. It does all the heavy lifting for you, which makes it ideal for ambitious developers who just want to ship quickly. Sails comes with a lot out of the box, so you don’t have to reinvent the wheel.

Authentication & Authorization

For instance, authentication—Sails provides robust session-based authentication that has been tried and tested. Remember, in The Boring Stack, we like tried-and-tested technology. Sails also has Sails Wish, a package I maintain for OAuth flows like Sign in with GitHub and Sign in with Google.

Authorization is built-in with policies, which means you don’t have to deal with the common issue in modern SPAs where users briefly see unauthenticated content before the client-side engine kicks in. In The Boring Stack, the client and server are one, so authorization happens immediately—no flash of the wrong state.

ORM & Database Flexibility

Sails has a robust ORM called Waterline that makes working with databases seamless. Unlike other stacks where you have to pick and integrate an ORM, Waterline is first-party and provides an easy-to-use, flexible API. It supports multiple databases, meaning you can swap databases without friction. Whether you're using MySQL, PostgreSQL, or MongoDB, the query layer remains the same.

Real-Time WebSockets & File Uploads

Real-time WebSocket support is built into Sails from day one via Socket.io. In fact, the creator of Sails, Mike McNeil, built it specifically for real-time apps in JavaScript. This means WebSocket support isn’t an afterthought—it’s baked into the framework at the DNA level.

File uploads are super easy with Skipper, a powerful body parser that allows you to upload files to local storage, Amazon S3, Cloudflare, DigitalOcean Spaces, and more—all directly from the browser.

Other Built-In Features

Beyond that, Sails includes:

  • Shell scripts & job scheduling for running background tasks

  • Email support via Sails Mail for sending transactional emails

All of these are things real applications need, and Sails provides them out of the box, all in one place, so everything works seamlessly together.

Conclusion: The Power of Sails

Sails is stable, boring (in a good way), and feature-complete. It eliminates 70% of the backend work involved in building a full-stack application, allowing you to focus on your UI—which is often the biggest differentiator for your app. The backend remains solid, reliable, and boring, letting you build quickly and confidently.

So that’s why we’re using Sails in The Boring JavaScript Stack—it’s elegant, simple, and designed to help you ship fast.

Full Course

$
299.00

USD

plus local taxes
Buy Now

I really like what you are doing with the Sails ecosystem in that you are making it easier for the average developer to make a SaaS

Maxwell Desjardins

sponsor logo

Render

Build, deploy, and scale your apps with unparalleled ease.

sponsor logo

Sentry

Code breaks, fix it faster with Sentry.

sponsor logo

Onboardbase

Secrets manager for secure dev team collaboration.