2

When I make the request post on page of login I receive this error:

Error: getaddrinfo ENOTFOUND bluebirdpages.olk.com

But this just happens in production in localhost works, I dont know why..

My code:

const express = require('express');
const bodyParser = require('body-parser');
const logger = require('morgan');
const http = require('http');
const path = require('path');

const app = express();

app.use(logger('dev'));

app.use(bodyParser.json());
app.use(bodyParser.urlencoded({ extended: false }));

const port = process.env.PORT || 8000;

const server = http.createServer(app);

var options = {
  host: 'bluebirdpages.olk.net/',
  path: '/login',
  method: 'POST'
}

http.request(options, callback);

app.use(express.static(path.join(__dirname, 'client/build')));

require('./server/routes')(app);

app.get('*', (req, res) => res.status(200).send({
  message: 'Welcome'
}));

server.listen(port);

module.exports = app;

Someone know why? and could help me? Please..

Gabboxl
  • 91
  • 3
  • 16
ELD
  • 168
  • 4
  • 14
  • 2
    Please you check the link below: https://stackoverflow.com/questions/17690803/node-js-getaddrinfo-enotfound – jokova Nov 16 '18 at 17:09

0 Answers0