-1

I'd like to disable the strongloop api explorer (pref as noted in docs) - not clear if this is a bug or documentation issue.

Setting or replacing component config or using component-config.production as noted in the docs fails and generates an critical error / crashing express.

// Original
{
  "loopback-component-explorer": {
    "mountPath": "/explorer"
  }
}

// changes made to disable
{
  "loopback-component-explorer": false
}

Docs: https://docs.strongloop.com/display/APIC/Preparing+for+deployment#Preparingfordeployment-DisablingAPIExplorer

4

2 回答 2

1

从您的文件中完全删除该loopback-component-explorer条目。component-config.json

于 2016-03-31T18:21:47.740 回答
0

您只能从“component-config.json”中删除“loopback-component-explorer”部分并保留空对象,代码不会崩溃。

原始代码:

{
 "loopback-component-explorer": {
 "mountPath": "/explorer"
 }
}

更新:

{
}

也可以关闭堆栈跟踪,更多信息在这里

于 2018-08-09T04:40:18.417 回答