在远程服务器上不显示Strongloop Loopback资源pipe理器

我已经在本地构build了一个强大的环回API服务器,一切正常,但是当我将它上传到远程服务器时,SLC RUN命令运行正常(我可以在terminal上看到它实际上在MySQL数据库中创build了我的testing模型服务器),但我无法访问example.com/explorer页面来查看API …我是否需要configuration不同的东西,以使其在远程服务器上工作?

我将端口从3000更改为3001.这是我在服务器文件中的config.json文件。

{ "restApiRoot": "/api", "host": "www.example.com", "port": 3001, "remoting": { "context": { "enableHttpContext": false }, "rest": { "normalizeHttpPath": false, "xml": false }, "json": { "strict": false, "limit": "100kb" }, "urlencoded": { "extended": true, "limit": "100kb" }, "cors": { "origin": true, "credentials": true }, "errorHandler": { "disableStackTrace": false } } } 

和启动目录中的资源pipe理器文件(是的,我运行npm安装loopback-explorer)…

 module.exports = function mountLoopBackExplorer(server) { var explorer; try { explorer = require('loopback-explorer'); } catch(err) { // Print the message only when the app was started via `server.listen()`. // Do not print any message when the project is used as a component. server.once('started', function(baseUrl) { console.log( 'Run `npm install loopback-explorer` to enable the LoopBack explorer' ); }); return; } var restApiRoot = server.get('restApiRoot'); var explorerApp = explorer(server, { basePath: restApiRoot }); server.use('/explorer', explorerApp); server.once('started', function() { var baseUrl = server.get('url').replace(/\/$/, ''); // express 4.x (loopback 2.x) uses `mountpath` // express 3.x (loopback 1.x) uses `route` var explorerPath = explorerApp.mountpath || explorerApp.route; console.log('Browse your REST API at %s%s', baseUrl, explorerPath); }); }; 

港口是问题,看问题的意见。 closures。