2013-10-10 17:53:06 +00:00
## Command Line Tool
2013-09-05 23:52:26 +00:00
2013-10-10 17:53:06 +00:00
StrongLoop Suite includes a command-line tool, `slc` (StrongLoop Command), for working with applications.
The `slc lb` command enables you to quickly create new LoopBack applications and models with the following sub-commands:
2013-09-05 23:52:26 +00:00
2013-10-10 17:53:06 +00:00
* [workspace ](#workspace ): create a new workspace, essentially a container for multiple projects.
* [project ](#project ): create a new application.
* [model ](#model ): create a new model for a LoopBack application.
2013-09-05 23:52:26 +00:00
2013-10-10 17:53:06 +00:00
For more information on the `slc` command, see [StrongLoop Control ](/strongnode/#strongloop-control-slc ).
2013-09-05 23:52:26 +00:00
2013-10-10 17:53:06 +00:00
### workspace
2013-09-05 23:52:26 +00:00
2013-10-10 17:53:06 +00:00
< pre >
slc lb workspace < i > wsname< / i >
< / pre >
2013-09-05 23:52:26 +00:00
2013-10-10 17:53:06 +00:00
Creates an empty directory named _wsname_ . The argument is optional; default is "loopback-workspace".
2013-09-05 23:52:26 +00:00
2013-10-10 17:53:06 +00:00
A LoopBack workspace is essentially a container for application projects. It is not required to create an application, but may be helpful for organization.
2013-09-05 23:52:26 +00:00
2013-10-10 17:53:06 +00:00
### project
2013-09-05 23:52:26 +00:00
2013-10-10 17:53:06 +00:00
< pre >
slc lb project < i > app_name< / i >
< / pre >
2013-09-05 23:52:26 +00:00
2013-10-10 17:53:06 +00:00
Creates a LoopBack application called _appname_ , where _appname_ is a valid JavaScript identifier.
This command creates a new directory called _appname_ in the current directory containing:
* app.js
* package.json
* modules directory, containing: < ul >< li > app directory - contains config.json, index.js, and module.json files
< / li >
< li > db directory - contains files index.js and module.json< / li >
< li > docs directory - contains files config.json, index.js, and module.json; explorer directory< / li > < / ul >
2013-09-05 23:52:26 +00:00
2013-10-10 17:53:06 +00:00
### model
2013-09-17 06:20:17 +00:00
2013-10-10 17:53:06 +00:00
< pre >
slc lb model < i > modelname< / i >
< / pre >
Creates a model named _modelname_ in an existing LoopBack application.
Provide the
`-i` or `--interactive` flag to be prompted through model
configuration. Use the `--data-source` flag to specify the name of a
custom data source; default is data source named "db".