text: require('dotenv').config();
  
  const express = require('express');
  const bodyParser = require('body-parser');
  const path = require('path');
  const authRoute = require('./routes/auth');
  const PORT = process.env.PORT || 5000;
  
  const app = express();
  app.use(bodyParser.json());
  app.use(bodyParser.urlencoded({ extended: true }));
  
  // API calls
  app.use('/api/users', authRoute);
  
  app.get('/api/hello', (req, res) => {
    res.send({ express: 'Hello From Express' });
  });
  
  app.post('/api/world', (req, res) => {
    console.log(req.body);
    res.send(
      `I received your POST request. This is what you sent me: ${req.body.post}`,
    );
  });
  
  if (process.env.NODE_ENV === 'production') {
    // Serve any static files
    app.use(express.static(path.join(__dirname, '../client/build')));
  
    // Handle React routing, return all requests to React app
    app.get('*', function(req, res) {
      res.sendFile(path.join(__dirname, '../client/build', 'index.html'));
    });
  }
  
  app.listen(PORT, () => console.log(`Listening on port ${PORT}`));
  