RSS

Sails JS

21 May

Here are some of the steps to create Sails Application and use the app. Also posting some of the useful sites / blogs/ YTB videos.

Steps

  1. Install node.js (latest version – mine : 2.7.4)
  2. Open Node.js command prompt and execute the below commands.
  3. npm install sails -g  — this will install the sails
  4. sails new <project name> —  normal project creation
  5. sails lift — server start up

Use this localhost URL to see the default  page

http://localhost:1337/

6. Want to see your own page, create a new index.ejs file and update routes.js file with index.ejs path.

http://localhost:1337/index

7. sails generate api user —  this will generate the user model for us.

Use the below urls to create the user data

http://localhost:1337/user/create?name=eedanna&email=eed@test.com

http://localhost:1337/user/create?name=test&email=test@test.com

8. The above data stored in the below location for reference.

               <projectname>\.tmp\localDiskDb.db

9. Delete the record

http://localhost:1337/user/destroy/1

Some of the reference here.

irlnathan.github.io

Sails JS document Reference here.

SailsJS – YouTube

SailsJS GitHub here.

Blog

Sails Good & Bad

Node & Sails

All Courses @ platzi

Introduction to Sails

Happy Learning!.

Get glued to know more updates.

Have a nice day 🙂

Advertisements
 
Leave a comment

Posted by on May 21, 2015 in Uncategorized

 

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

 
%d bloggers like this: