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?
在他们的所有教程LoopBack入门中,他们使用$ slc start启动应用程序。我一步一步地按照教程,但我的应用程序不以$ slc start开头。我的意思是,服务器localhost:3000不是用命令启动的。但是,它以$ slc run开头。为什么会这样?为什么$ slc start不起作用但他们全部使用它?
Here is an output when I run $ slc start
which doesn't work. The "page is not available":
这是我运行$ slc start时无法正常工作的输出。 “页面不可用”:
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:
这是$ slc run的输出。这工作,启动服务器:
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 } ]
2 个解决方案
#1
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.
slc start用于启动流程管理器下的应用程序。我们建议使用节点。启动应用程序(slc run是节点的别名。反正)。我已经要求我们的文档人员相应地更新所有参考文献。
#2
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.
我们实际上更改了LoopBack文档以启动带节点的应用程序。到处都是slc而不是slc。使用节点。更适合在本地系统上进行开发,因为它可以为您提供即时反馈,错误跟踪等。显然我们在OP之后立即进行了此更改。
Using slc start
is useful to configure clustering and run the app under control of Str
使用slc start对于配置群集并在Str的控制下运行应用程序非常有用
Rand
兰德
#1
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.
slc start用于启动流程管理器下的应用程序。我们建议使用节点。启动应用程序(slc run是节点的别名。反正)。我已经要求我们的文档人员相应地更新所有参考文献。
#2
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.
我们实际上更改了LoopBack文档以启动带节点的应用程序。到处都是slc而不是slc。使用节点。更适合在本地系统上进行开发,因为它可以为您提供即时反馈,错误跟踪等。显然我们在OP之后立即进行了此更改。
Using slc start
is useful to configure clustering and run the app under control of Str
使用slc start对于配置群集并在Str的控制下运行应用程序非常有用
Rand
兰德