Creating a new Sails project

Installing Sails

Summary

In this lesson, we learn how to install Sails on our local machine. Before installing Sails, we need to ensure that both Node.js and NPM are installed. We can check their versions by running:

  • node -v (to check the Node.js version)

  • npm -v (to check the NPM version)

To install the Sails CLI, we run the following command:

npm i -g sails

This installs Sails globally, allowing us to use it from the command line.

Once installed, we verify the installation by running:

sails -v

If successful, it will return the installed Sails version (e.g., 1.4.2).

In the next lesson, we will create our first Sails project.

Transcript

Alright, now in this lesson, we are going to install Sails on our local machine. Before we do that, you have to make sure you have both Node and NPM installed. One way to quickly check that is by running:

  • node -v (to check your installed Node.js version)

  • npm -v (to check your installed NPM version)

We also need to install the Sails CLI. This is a command-line tool that allows you to create new Sails projects, run your Sails application, and generate different parts of your app to make development easier.

To install it, we run:

npm i -g sails

This command tells NPM to install Sails globally, fetching it from the registry and making it available system-wide.

Once the installation is complete, we can check if Sails was installed successfully by running:

sails -v

If everything is set up correctly, it will return the installed version of Sails.

For example, after running the command, I see 1.4.2, which confirms that Sails is installed.

Now, in the next lesson, we will create our first Sails project.

Full Course

$
29.99

USD

plus local taxes
Buy Now