The Sailscasts Blog
Best practices, Tips & Tricks, Updates, ideas, and inspiration from Sailscasts to help developers build and design software.
The Sailcasts Blog Newsletter
Get notified 🔔 when new articles are published on the Sailcasts Blog.
How I set up end-to-end testing in Sails with Playwright
I have been researching Playwright for a while now and finally decided to take the plunge and set up end-to-end testing in the sailscasts.com codebase with it. Let me show you how I did it.
Introducing sailscasts.com 2.0
Super excited to announce a whole new rewrite to sailscasts.com powered by simple technologies
Goodbye Nuxt, hello Inertia in Sails
Alright this is an article I have been looking forward to writing for quite a while now. I have been experimenting on a new way to have it all with a Sails driven codebase and I think I’ve found it.
Sailsconf 2022 is coming
The second Sailsconf - a global conference for the Sails community goes live in a couple of days
Using the paginate query modifier method for pagination
Sails provides a super useful syntactic sugar for paginating Waterline queries. In this article we will see how to get started using it in your applications.
Testing your Sails apps with Japa
Japa is an API-first testing framework. It focuses only on testing Node.js (backend) applications, thus resulting in a fast, small, and simple tests runner.
Modifying Sails log prefix with prefix themes
Sails ship with an elegant logger called captains-log. In this article we will see how to modify your logs prefix with the prefixTheme option.
Disabling the sails global
The sails global gives you access to the running Sails application instance and the properties and methods it exposes. In this article we will see how we can disable it and other ways to access the running Sails application instance.
Creating the Sails dotenv hook
In this article I will discuss why I created the sails-js-hook-dotenv package. We'll see why I needed the package and my learnings as I made it.
How I setup a WebSocket client in Nuxt
Sails makes it easy to setup and use WebSocket. In this article we will look at how I setup a WebSocket client to talk to a Sails API via WebSocket.
How I setup Sails and Tailwind CSS
Tailwind CSS is a utility-first CSS framework that allows you rapidly build modern websites without ever leaving your HTML. Here is how I setup a Sails project to use Tailwind CSS.
How to simulate latency in a Sails action
Having trouble testing your loading state when making a request to your local Sails API from your local frontend? Here is how to simulate latency...
How to specify a different Sails port
So you think Sails run on port 1337 by default? Wrong! In this article we will see how Sails really handles the default running port and how you can change it.
Tales from the very first Sailsconf
Sailsconf 2021 was an outstanding and unprecendented success, here is the gist...
Sailsconf is coming
The very first Sailsconf - a global conference for the Sails community goes live tomorrow
Build a URL shortener with Sails
A URL shortener is basically a tool that you give a long URL and it gives a shorter URL for convenience. In this article we will build a basic URL shortener using Sails.
Return or throw your response
Actions2 are a more modern way for authoring Sails actions. In this article we will look at how we can simply return or throw Sails responses.
Sails development with Docker and Docker Compose
Docker makes it easy to set up and run a development environment and also simplifies the deployment of your applications. In this article we will see how to setup a Sails development workflow with Docker and Docker Compose.
Understanding Waterline projections
Projections make for faster performance and better security when sending back records to a client by allowing you to select or omit fields to be returned.
Sails 1.4.2 release
Sails 1.4.2 release fixes the cyclic dependency warning in Node versions >= 14
How to configure ESLint and Standard JS in a Sails project
Linting improves readability and consitency in a codebase. It is a must have for teams to enforce coding style guides and standards, fix typos, find potential bugs across a codebase. In this article, we will be setting up ESLint and StandardJS in a Sails project.
Testing Sails Applications with Mocha and SuperTest
Testing or automated testing helps ensure code quality and serves as a measure to prevent you or other members of your team from shipping code with defects aka bugs to production. In this article we will look at setting up automated tests in Sails applications using Mocha and Supertest.
How to paginate your Sails APIs
Pagination helps splits the dataset being returned to a user into smaller chunks and return the rest as requested. In this article we will look at a couple of options on implementing pagination in your Sails APIs.
The Sailscasts Company launches
Sailscasts will be built by the folks at The Sailscasts Company - a company founded by Kelvin Omereshone dedicated to building and helping others build on Sails
Understanding Sails helpers
Sails provides you with a mechanism to share code in different places in your applications. This mechanism is called helpers. In this article we will dive into what helpers are and how to begin using them in your Sails application.
One way to organize Sails routes
Your custom routes definitions can easily get out of hand in a large Sails application. In this article we are going to take a look at a pattern I use in large Sails applications for organizing custom routes definitions.
Understanding Sails routes
Routes are URLs that a web client use to communicate with your application. In this article you will learn how Sails handles routes and how you can use them in your application.
Understanding Sails policies and best practices
Policies are versatile tools in Sails for authorization and access control. They give you the ability to execute some logic before an action is run for the purpose of ascertaining if the request should continue or not. This article will introduce policies in Sails, explain how to go about creating policies in Sails and the best practices to observe when doing so.
Migrating your Sails actions to actions2
Actions are Sails mechanisms that are responsible for responding and handling requests to your Sails applications. This article will introduce you to the actions2 style of writing actions in Sails and how to start using it in your Sails applications.