我是MEAN堆栈的新手
我遵循本教程 - https://coursetro.com/posts/code/84/Setting-up-an-Angular-4-MEAN-Stack-(Tutorial)
我安装了所有东西。
当我运行mongod时,我得到了
2017-12-30T11:38:12.746+0000 I FTDC [initandlisten] Initializing full-time diagnostic data capture with directory '/data/db/diagnostic.data'
2017-12-30T11:38:12.746+0000 I NETWORK [initandlisten] waiting for connections on port 27017
2017-12-30T11:39:24.412+0000 I NETWORK [listener] connection accepted from 127.0.0.1:58237 #1 (1 connection now open)
2017-12-30T11:39:24.412+0000 I NETWORK [conn1] received client metadata from 127.0.0.1:58237 conn: { application: { name: "MongoDB Shell" }, driver: { name: "MongoDB Internal Client", version: "3.6.1" }, os: { type: "Darwin", name: "Mac OS X", architecture: "x86_64", version: "17.2.0" } }
然后在另一个窗口中我运行mongo并获取
2017-12-30T11:38:12.737+0000 I CONTROL [initandlisten] ** WARNING: Access control is not enabled for the database.
2017-12-30T11:38:12.737+0000 I CONTROL [initandlisten] ** Read and write access to data and configuration is unrestricted.
2017-12-30T11:38:12.737+0000 I CONTROL [initandlisten]
2017-12-30T11:38:12.737+0000 I CONTROL [initandlisten] ** WARNING: This server is bound to localhost.
2017-12-30T11:38:12.737+0000 I CONTROL [initandlisten] ** Remote systems will be unable to connect to this server.
2017-12-30T11:38:12.737+0000 I CONTROL [initandlisten] ** Start the server with --bind_ip <address> to specify which IP
2017-12-30T11:38:12.737+0000 I CONTROL [initandlisten] ** addresses it should serve responses from, or with --bind_ip_all to
2017-12-30T11:38:12.738+0000 I CONTROL [initandlisten] ** bind to all interfaces. If this behavior is desired, start the
2017-12-30T11:38:12.738+0000 I CONTROL [initandlisten] ** server with --bind_ip 127.0.0.1 to disable this warning.
2017-12-30T11:38:12.738+0000 I CONTROL [initandlisten]
在浏览器窗口中,我看到&#39;应用程序正常运行&#39;来自Angular,但我没有看到来自mongo的输出。
mongod和mongo的输出看起来是否正确,mongo的警告是我需要解决的问题。
答案 0 :(得分:0)
基于日志,我可以说是mongo已正确安装。
确保您的节点服务器正在运行。(您的节点服务器未与mongo通信)
检查您的节点控制台或在浏览器中按F12并检查网络响应。