LoopbackJS - 如何定义客户端应用程序的入口点?

时间:2014-11-17 12:49:48

标签: node.js loopbackjs strongloop

我正在尝试创建一个环回项目,客户端应用程序将在localhost:3000中加载。

所以我在server / server.js中定义:

var path = require('path');
app.use(loopback.static(path.resolve(__dirname, '../client')));

其中client是前端文件的目录,我希望在localhost:3000中显示。 但是,当输入localhost:3000时,我仍然看到消息

'{"started":"2014-11-17T12:38:58.258Z","uptime":586.385}'

而不是index.html。

如何将入口点重定向到client / index.html?

谢谢

1 个答案:

答案 0 :(得分:3)

删除'/server/boot/root.js',它应该可以正常工作