text: const bodyParser = require('body-parser');
  const express = require('express');
  const userRoutes = require('./routes/userRoutes');
  const authRoutes = require('./routes/authRoutes');
  
  const app = express();
  
  app.use((req, res, next) => {
    res.header('Access-Control-Allow-Origin', '*');
    res.header('Access-Control-Allow-Headers', '*');
    res.header('Access-Control-Allow-Methods', 'GET, POST, OPTIONS, PUT, DELETE');
    res.header('Allow', 'GET, POST, OPTIONS, PUT, DELETE');
    next();
  });
  
  app.use(bodyParser.urlencoded({ extended: false }));
  app.use(bodyParser.json());
  app.use('/user', userRoutes);
  app.use('/auth', authRoutes);
  
  module.exports = app;
  