【发布时间】:2018-02-23 09:15:18
【问题描述】:
我正在尝试在本地运行项目的前端,但它给出了这个错误:
服务器监听 8080 端口连接错误:{ MongoError: failed 在第一次连接时连接到服务器 [aman:27017] [MongoError: getaddrinfo ENOTFOUND aman aman:27017]
下面是我的/_config.js 的样子
const hostname = 'localhost';
const port = '8080';
const secret = 'amangrk';
const debug = true;
const clientPort = 3000;
const mailgun_apiKey = 'amangrk';
const mailgun_domain = 'amangrk';
module.exports = {
debug: debug,
port: port,
urlAndPort: 'http://' + hostname + ':' + port,
hostName: hostname,
clientHostName: hostname,
clientPort: clientPort,
clientHostNameAndPort: hostname + clientPort,
redirectURL: 'http://' + hostname + ':' + clientPort + "/temp",
preRender: false,
url: 'http://' + hostname,
secret: secret,
filesDirectory: '/files',
rootDirectory: __dirname,
mailgun: {
apiKey: mailgun_apiKey,
domain: mailgun_domain
}
};
【问题讨论】: