2013-09-05 23:52:26 +00:00
|
|
|
## 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
|
|
|
|
```
|
|
|
|
|
2013-09-12 21:18:11 +00:00
|
|
|
#### project
|
2013-09-05 23:52:26 +00:00
|
|
|
|
2013-09-12 21:18:11 +00:00
|
|
|
Create a LoopBack application in a new directory within the current directory
|
2013-09-05 23:52:26 +00:00
|
|
|
using the given name. The name arg is required.
|
|
|
|
|
|
|
|
```sh
|
|
|
|
$ cd my-loopback-workspace
|
2013-09-12 21:18:11 +00:00
|
|
|
$ slc lb project my-app
|
|
|
|
$ slc run my-app
|
2013-09-05 23:52:26 +00:00
|
|
|
```
|
|
|
|
|
|
|
|
#### model
|
2013-09-17 06:20:17 +00:00
|
|
|
Create a model in an existing LoopBack application. If you provide the
|
2013-09-05 23:52:26 +00:00
|
|
|
`-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
|
|
|
|
```
|
2013-09-17 06:20:17 +00:00
|
|
|
|
|
|
|
---
|