Sails (Part 1)
Neil Haddley • October 12, 2021
Azure DevOps and Sails.
Sails.js (or Sails) is a web framework that makes it easy to build custom, enterprise-grade Node.js apps.
It is designed to resemble the MVC architecture from frameworks like Ruby on Rails.
The Azure DevOps Starter includes support for Sails.

DevOps Starter

Create DevOps starter

Setting up Node.js web app with GitHub

Select Sails.js and add a database

Web App for Containers

Connect to GitHub

Web App, Container Registry and Database settings

Review and Create

Deployment in progress

Deployment is complete

GitHub action is running

Authorise

Build and push Application to Container Repository

Run functional tests (Connect to web site using Selenium and check site title)

set up test environment and run tests

GitHub action/job complete

web site has been published

Open GitHub repository using GitHub Desktop

Clone

Open in Visual Studio Code

Sample Functional Tests
local development environment
Open Visual Studio Code terminal
Navigate to the Application folder
BASH
1% cd Application
Start the application on the laptop
BASH
1% sails lift

sails lift

http://localhost:1337
Testing testing
Updating the default page title (in the layout file) results in a failed test.

Updating the web page title (without updating the web page title test)

pushing update

code is deployed and functional test fails (as expected)