Saturday, July 9, 2016

Installing Sails on Mac

First ran the command 
sudo npm -g install sails 

after the sails framework is installed successfully, 

Run the command to create a test project 
sails new testProject

This created the below directory structure 

api => This contains directories such as controllers, models, policies, responses, services. In this only policies and responses contain some of the default information. 
assets => This folder contained js, favicon.ico, images, styles, templates, robots.txt  
config => Config contained lot of files, this seems to be the config files for the APIs which applications can use. For e.g. policies.js, socket.js http.js etc
node_modules => This seems to contain the library files 
tasks => 
views 
app.js
Gruntfile.js
package.son
README.md

After this, just had to run the command 
sails lift 

the above command needs to be run from the same directory as the project root, in this case “testProject” 

Now by default, this brings up the server on the port 1337 accessible like below 
http://localhost:1337/

references:

No comments:

Post a Comment