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..