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("/", (req, res) => {

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

  });

  

  module.exports = router;

error is in your ‘’

Getting started with Socket.io | Scaleway Documentation

1 Like

I’ve edited your post for readability. When you enter a code block into a forum post, please precede it with a separate line of three backticks and follow it with a separate line of three backticks to make it easier to read.

You can also use the “preformatted text” tool in the editor (</>) to add backticks around text.

See this post to find the backtick on your keyboard.
Note: Backticks (`) are not single quotes (’).

This topic was automatically closed 182 days after the last reply. New replies are no longer allowed.