React JS , and server error

console.warn(‘crbug/1173575, non-JS module files deprecated.’);

what has to be done ?
const express=require(‘express’);

const socketio =require(‘socket.io’);

const http= require(‘http’);

const cors = require(‘cors’);

const PORT= process.env.PORT || 5000 ;

const router = require(’./router’);

const app=express();

const server= http.createServer(app);

const io= socketio(server);

app.use(cors());

app.use(router);

server.listen(PORT,()=>console.log(Server has started on port ${PORT}))


const express = require (‘express’);

const router = express.Router();

router.get(“https://forum.freecodecamp.org/”, (req, res) => {

res.send({ response: "Server is up and running." }).status(200);

});

module.exports = router;

Source link