Sails makes it easy to build custom, enterprise-grade Node.js apps. Sails is 100% javascript.

Pre-Reqs

  • VS code
  • Node.js installed on your machine

Create sample sails.js local app following below steps

npm -g install sails
sails new app
cd app
sails lift

1

If you open app folder in VS code. It should look like below

3

Output:

2

Create Web App Linux in Azure portal ** 5

Push your code to github

 git init
 git remote add origin <git url>
 git add .
 git commit -m "some message"
 git push origin master

Enable Deployment options in portal. In this blog i did selected Github, choose the repo and save the changes.

Check for Deployment logs if it fails.

6

App published on Azure.

4

Few errors i faced after pushing code to Azure

 SyntaxError: Unexpected token function - Async function

As Async functions are not supported in Node versions older than 7.6 I updated Node version to 10.1 in Application settings.

7

Also include onlyAlloworigins in config –> env –> production.js

8