我似乎无法启动nodeJS服务

时间:2017-03-15 18:42:27

标签: node.js

我正在尝试启动服务:

c:\MongoUni\Ex3\chapter3>node index.js
express-session deprecated undefined resave option; provide resave option auth.js:48:37
express-session deprecated undefined saveUninitialized option; provide saveUninitialized option auth.js:48:37
Listening on port 3000!

我收到此错误

c:\MongoUni\Ex3\chapter3\node_modules\mongodb\lib\server.js:228
        process.nextTick(function() { throw err; })
                                      ^
Error: connect ECONNREFUSED 127.0.0.1:27017
    at Object.exports._errnoException (util.js:1022:11)
    at exports._exceptionWithHostPort (util.js:1045:20)
    at TCPConnectWrap.afterConnect [as oncomplete] (net.js:1087:14)

1 个答案:

答案 0 :(得分:1)

看起来您的应用正在尝试在端口27017连接到mongodb,但您的计算机上没有运行。以下是有关如何在Windows上安装它的说明(我猜你是基于文件路径运行的)https://docs.mongodb.com/manual/tutorial/install-mongodb-on-windows/