Reputation: 30845
I follow "Getting started with LoopBack" tutorial (http://docs.strongloop.com/display/public/LB/Getting+started+with+LoopBack). And in the first step of the tutorial they start the app with $ slc run
and on other steps they start the app with $ slc start
. And they do not give explanation what is the difference between run
and start
.
And when I start my app with $ slc start
the server doesn't start at all. Only $ slc run
starts the server. Here is an output of $ slc start
where nothing works:
C:\Users\user\sbox\strongloop\hello>slc start .
App `.` started under local process manager.
View the status: slc ctl status
View the logs: slc ctl log-dump
More options: slc ctl -h
And when I check the status, it says that it is stopped:
C:\Users\user\sbox\strongloop\hello>slc ctl status
manager:
pid: 4764
port: 8701
base: C:\Users\user\.strong-pm
current:
status: stopped
link: C:\Users\user\sbox\strongloop\hello
current: hello
branch: local-directory
worker count: 0
And here is an example where they start the different ways:
1) http://docs.strongloop.com/display/public/LB/Create+a+simple+API
Run the application:
$ slc run
2) http://docs.strongloop.com/display/public/LB/Use+API+Explorer
Run the application:
$ slc start
3) ttp://docs.strongloop.com/display/public/LB/Connect+your+API+to+a+data+source
Now run the application:
$ slc start
5) http://docs.strongloop.com/display/public/LB/Add+a+static+web+page
Run it....!
$ slc start
6) http://docs.strongloop.com/display/public/LB/Add+a+custom+Express+route
Now, run the application again:
$ slc start
So, my questions are:
1) Why on the first step they used $ slc run
and all other steps they used $ slc start
?
2) What is the difference between $ slc run
and $ slc start
?
3) Is it a question for StrongLoop forum or is it a question for LoopbackJS forum? Because the tutorial I follow is located on http://docs.strongloop.com/ and is called "Getting started with LoopBack" and the command I run is $ slc
(StrogLoop Controller). It is confusing.
Upvotes: 0
Views: 871
Reputation: 408
Sorry, you caught us in the midst of a documentation change.
You should generally use node .
to run your loopback applications during development.
slc run
is the supervisor. It is being replaced with the process manager. The supervisor did useful things (dynamic control of your app using CLI, automatic clustering, restart on failure, etc.), but it didn't do lots of other things we needed, such as dynamic app control using a UI, graphical cpu and heap profiling, metrics graphing, management of deployments, etc.
The process manager does all this, and it's UI is slc arc
. slc start
starts your app so that slc arc
can interact with it.
Upvotes: 3