Javascript 错误:在post调用中getaddrinfo ENOTFOUND
当我在Javascript 错误:在post调用中getaddrinfo ENOTFOUND,javascript,node.js,Javascript,Node.js,当我在login页面上发出请求post时,我收到此错误: 错误:getaddrinfo ENOTFOUND bluebirdpages.olk.com 但是这种情况只发生在生产中在本地主机中工作,我不知道为什么 我的代码: const express=require('express'); const bodyParser=require('body-parser'); 常量记录器=需要('morgan'); const http=require('http'); const path=req
login
页面上发出请求post
时,我收到此错误:
错误:getaddrinfo ENOTFOUND bluebirdpages.olk.com
但是这种情况只发生在生产中在本地主机中工作,我不知道为什么
我的代码:
const express=require('express');
const bodyParser=require('body-parser');
常量记录器=需要('morgan');
const http=require('http');
const path=require('path');
常量app=express();
应用程序使用(记录器(“开发”);
use(bodyParser.json());
use(bodyParser.urlencoded({extended:false}));
const port=process.env.port | 8000;
const server=http.createServer(app);
变量选项={
主机:“bluebirdpages.olk.net/”,
路径:'/login',
方法:“发布”
}
请求(选项、回调);
app.use(express.static(path.join('client/build'));
需要('./服务器/路由')(应用程序);
app.get('*',(req,res)=>res.status(200).send({
信息:“欢迎”
}));
监听(端口);
module.exports=app代码>请检查以下链接: