Skip to content
Eugene Obrezkov edited this page Sep 14, 2015 · 7 revisions

Install modules

First of all, you need to install yeoman and generator-sails-rest-api:

sudo npm install -g yo generator-sails-rest-api

Initiate the generator

You must create your project directory and then initiate the generator under the project directory:

mkdir my-project
cd my-project
yo sails-rest-api

Answer questions

You will be prompted to answer the questions. When you answered to those questions you will get configured Sails project.

Running the server

After project scaffolding you can use it as a simple NodeJS server. Just run the app.js file and all.

npm start

Congratulations

Congratulations, you have set up your Sails REST API 👍