Warning: file_get_contents(/data/phpspider/zhask/data//catemap/2/node.js/37.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Javascript 错误:在post调用中getaddrinfo ENOTFOUND_Javascript_Node.js - Fatal编程技术网

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请检查以下链接: