Sails JS in Question and Answer (part 1)

Saturday 2 January 2016


Q-1) What is Sails js ?

Sails js is a MVC framework which is used to make / build custom, enterprise-grade Node js application.

Q-2) Which kind of application can we make using Sails js ?


By using sails we can make following kind of applications,


  1. -> Chat application
  2. -> Real-time dashboard 
  3. -> Multi player games
  4. -> Any web projects from top to bottom 


Q-3) What are the features of sails js ?

Following are the listed features of sails js,



  1. -> 100 % Java Script
  2. -> Sails supports any database
  3. -> Powerful associations 
  4. -> Auto-generated REST APIs
  5. -> Easy web-socket support
  6. -> Re-usability Security Policies
  7. -> Front-end agnostic
  8. -> Flexible asset pipeline 
  9. -> Rock-solid foundation 

Q-4) How to install Sails ?

If you have install Node in your system, then type following command to install sails,

For Linux/Unix,

sudo npm install sails

or

sudo npm -g install sails (for globally)

For Windows/Mac OS,

npm install sails

or

npm -g install sails

Q-5) What is the pre-requisites for sails js ?


Node should be install in your system and should have basic knowledge on Node.

Q-6) How to create a sails project ?

Following are the steps to create new sails project,

Step 1: (Create new app/project)

First go the drive/folder where you want to create the project, for example we will create the project in Desktop then you need to go to Desktop location i.e

> cd Desktop

For creating project type following command,

sails new testProject

Step 2: (List/Start the server)

Now go to the project folder through command i.e

> cd testProject

Now lift/start the server,

sails lift

After successfully starting the server, you will get following screen,




Q-7) What is the default port number of sails js project ?

1337 is the default port of sails project.

Q-8) How change the port number of sails project ?


Open the development.js present in \config\env\ folder and write port as 3080 or your required port number as follows,



Q-9) What is the ORM used by sails ?

Sails uses the ORM called Waterline ORM.

Q-10) What is the folder structure of a sails js project ?

Following is the folder structure of sails js project. For example testProject is the project name then the folder structure is as follows,



No comments:

Post a Comment

 
About Contact Career Advertise Job Support Online Training Acardemic Projects Internship
Copyright © 2016. [ info ].
Design by Herdiansyah Hamzah. & Distributed by Free Blogger Templates
Creative Commons License