
Install
$ slc loopback
_-----_
| | .--------------------------.
|--(o)--| | Let's create a LoopBack |
`---------´ | application! |
( _´U`_ ) '--------------------------'
/___A___\
| ~ |
__'.___.'__
´ ` |° ´ Y `
[?] Enter a directory name where to create the project: (.) $ cd myproject
$ slc loopback:datasource$ npm install loopback-connector-mongodb --save
$ slc loopback:model$ slc run
Browse your REST API at http://localhost:3000/explorer
Web server listening at: http://localhost:3000/API Explorer

> use test
switched to db test
> show collections;
CoffeeShop
system.indexes
> db.CoffeeShop.find().limit(4)
{ "Name" : "Aesop's Tables", "pos" : { "lat" : 37.5332, "lng" : -85.7302 }, "_id" : ObjectId("543f0787f9fed2bb759fc146") }
{ "Name" : "Award Winners Cafe", "pos" : { "lat" : 41.3896, "lng" : -88.12595 }, "_id" : ObjectId("543f0787f9fed2bb759fc147") }
{ "Name" : "Acadia Cafe", "pos" : { "lat" : 44.454, "lng" : -68.04902 }, "_id" : ObjectId("543f0787f9fed2bb759fc148") }
{ "Name" : "Adams Coffee Shop", "pos" : { "lat" : 42.25639, "lng" : -71.01119 }, "_id" : ObjectId("543f0787f9fed2bb759fc149") }
> $ slc loopback:relationCustomer - hasMany Review
CoffeeShop - hasMany Review
Review - belongsTo Customer
Review - belongsTo CoffeeShop
$ slc loopback:acl
[?] Select the model to apply the ACL entry to: CoffeeShop
[?] Select the ACL scope: All methods and properties
[?] Select the access type: All (match all types)
[?] Select the role: Any unauthenticated user
[?] Select the permission to apply: Explicitly deny access$ npm install -g http://get-studio.strongloop.com/strong-studio.tgz
$ cd <yourapp>
$ strong-studio
Strong-Studio docs - http://docs.strongloop.com/display/SLS/StrongLoop+Studio+beta

mysql> use coffee;
Database changed
mysql> show tables;
+------------------+
| Tables_in_coffee |
+------------------+
| Coffee |
+------------------+
1 row in set (0.15 sec)
mysql> describe Coffee;
+-----------+--------------+------+-----+---------+----------------+
| Field | Type | Null | Key | Default | Extra |
+-----------+--------------+------+-----+---------+----------------+
| id | int(11) | NO | PRI | NULL | auto_increment |
| Name | varchar(512) | YES | | NULL | |
| RoastType | varchar(512) | YES | | NULL | |
+-----------+--------------+------+-----+---------+----------------+
3 rows in set (0.07 sec)


**Use the loadtest.js script to generate load
$ slc run --metrics <statsd-url>Text
$ slc run --cluster cpus -d$ slc runctl objects-start <pid>$ slc runctl cpu-start <pid>
$ slc runctl cpu-start <pid>
$ slc runctl heap-snapshot <pid>


getIndexes()
$ slc debug
$ rm -rf node_modules // Shouldnt commit node_modules into master branch
$ git init .
$ git commit -a -m "Initial commit"
$ slc build --onto deploy --install --commit
$ slc pm -l 7777$ slc deploy http://localhost:7777 deploy Run an application cluster
$ slc run --cluster=cpus$ slc run --cluster cpus --log getstarted.%w.log