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.
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.