1

In all their tutorial Getting started with LoopBack they start the app with $ slc start. I follow the tutorial step by step but my app doesn't start with $ slc start. I mean, the server localhost:3000 isn't started with the command. However, it starts with $ slc run. Why it happens? Why $ slc start doesn't work but they use it all over?

Here is an output when I run $ slc start which doesn't work. The "page is not available":

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 for some reason:

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 the output of $ slc run . that works, that starts the server:

C:\Users\user\sbox\strongloop\hi>slc run .
INFO strong-agent API key not found, StrongOps dashboard reporting disabled.
Generate configuration with:
    npm install -g strongloop
    slc strongops
See http://docs.strongloop.com/strong-agent for more information.
supervisor running without clustering (unsupervised)
Browse your REST API at http://localhost:3000/explorer
Web server listening at: http://localhost:3000/
Models created:
 [ { name: 'Bel Cafe', city: 'Vancouver', id: 1 },
  { name: 'Three Bees Coffee House', city: 'San Mateo', id: 2 },
  { name: 'Caffe Artigiano', city: 'Vancouver', id: 3 } ]
Green
  • 28,742
  • 61
  • 158
  • 247

2 Answers2

0

slc start is used to start apps under process manager. We recommend using node . to start applications (slc run is an alias for node . anyways). I've asked our docs guy to update all references accordingly.

superkhau
  • 2,781
  • 18
  • 9
0

We actually changed the LoopBack docs to start apps with node . everywhere instead of slc start. Using node . is more appropriate for development on a local system because it gives you immediate feedback, error traces, etc. Apparently we made this change right after the OP.

Using slc start is useful to configure clustering and run the app under control of Str

Rand

RandM
  • 231
  • 1
  • 3