Sailscasts is now live 🔥. Get 50% off a Sailscasts Pro subscription now!
The Sailscasts Blog

#sails

Link

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.

Build a URL shortener with Sails

Kelvin Omereshone

4. May 2021. 10 min read.
Link

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.

Return or throw your response

Kelvin Omereshone

14. April 2021. 2 min read.
Link

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.

Sails development with Docker and Docker Compose

Federico Vidueiro

8. April 2021. 7 min read.
Link

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.

Understanding Waterline projections

Kelvin Omereshone

18. March 2021. 4 min read.
Link

Sails 1.4.2 release

Sails 1.4.2 release fixes the cyclic dependency warning in Node versions >= 14

Sails 1.4.2 release

Kelvin Omereshone

14. March 2021. 1 min read.
Link

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.

How to configure ESLint and Standard JS in a Sails project

Kelvin Omereshone

4. February 2021. 5 min read.
Link

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.

Testing Sails Applications with Mocha and SuperTest

Kelvin Omereshone

26. January 2021. 8 min read.
Link

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.

How to paginate your Sails APIs

Kelvin Omereshone

12. January 2021. 6 min read.
Link

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.

Understanding Sails helpers

Kelvin Omereshone

9. December 2020. 5 min read.
Link

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.

One way to organize Sails routes

Ali Emre Çakmakoğlu

26. November 2020. 2 min read.
Link

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 routes

Kelvin Omereshone

11. November 2020. 6 min read.
Link

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.

Understanding Sails policies and best practices

Kelvin Omereshone

29. October 2020. 5 min read.
Link

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.

Migrating your Sails actions to actions2

Kelvin Omereshone

21. October 2020. 10 min read.