Merge pull request #24 from strongloop/cli

Add command line docs
This commit is contained in:
Ritchie Martori 2013-09-06 12:09:23 -07:00
commit b1d554709d
2 changed files with 42 additions and 1 deletions

View File

@ -8,6 +8,7 @@
"docs/concepts.md",
{"title": "API", "depth": 2},
"docs/api.md",
"docs/rest.md"
"docs/rest.md",
"docs/cli.md"
]
}

40
docs/cli.md Normal file
View File

@ -0,0 +1,40 @@
## Command Line
The StrongLoop Suite comes bundled with a command line tool called StrongLoop
Command or `slc`. StrongLoop Command allows you to create boilerplate for
LoopBack and other StrongNode applications.
### Commands
`slc lb` provides the following commands.
#### workspace
Initialize a workspace as a new empty directory with an optional
name. The default name is "loopback-workspace".
```sh
$ slc lb workspace my-loopback-workspace
```
#### api
Create a LoopBack application in a new directory within a workspace
using the given name. The name arg is required.
```sh
$ cd my-loopback-workspace
$ slc lb api my-app
$ slc run app
```
#### model
Create a model in an existing LoopBack application. If you provide the
`-i` or `--interactive` flags, you will be prompted through a model
configuration. The `--data-source` flag allows you to specify the name of a
custom data. Otheriwse it will use the data source named "db".
```sh
$ cd my-app
$ slc lb model product
```