Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

326
Views
How to proxy my React frontend to my Node backend?

I am trying to concurrently run my React frontend with my Node backend but I keep getting this error. I have have search online for a solution but I haven't gotten any clear answer. How can I solve this issue?

(node:10084) [DEP_WEBPACK_DEV_SERVER_ON_AFTER_SETUP_MIDDLEWARE] DeprecationWarning: 'onAfterSetupMiddleware' option is deprecated. Please use the 'setupMiddlewares' option.
[1] (Use `node --trace-deprecation ...` to show where the warning was created)
[1] (node:10084) [DEP_WEBPACK_DEV_SERVER_ON_BEFORE_SETUP_MIDDLEWARE] DeprecationWarning: 'onBeforeSetupMiddleware' option is deprecated. Please use the 'setupMiddlewares' option. 


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


// data parsing
var urlencodedParser = bodyParser.urlencoded({ extended: false })

app.post('/contact', urlencodedParser, function(req, res){
 console.log(req.body)
 res.render('contact', {qs: req.query});

   let transporter = nodemailer.createTransport({
     service: 'gmail',
     auth: {
       user: 'bojurier@gmail.com', // generated ethereal user
       pass: process.env.EMAIL_SECRET_PASS // generated ethereal password
     },
     
 });
 const mailOption = {
   name: req.body.name,
   from: req.body.email,
   to: 'bojurier@gmail.com',
   text: req.body.message

 }
 transporter.sendMail(mailOption, (error, info) =>{
   if(error){
     console.log(error)
     res.send('error')
   } else {
     console.log('Email sent: ' + info.response)
     res.send('Success')
   }
 })
});


const PORT = process.env.PORT || 5000;
app.listen(PORT, () => console.log(`Server running on port ${PORT}`));


over 4 years ago · Santiago Trujillo
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!