Trying out the integration

To test out this integration, we can set up an example route, as follows:

router.route('/game/play')   .get((req, res) => {      res.sendFile(process.cwd()+'/server/vr/index.html') }) 

Then run the MERN server, and open the route in the browser at localhost:3000/game/play. This should render the React 360 game implemented in this chapter from within our MERN application.

Get Full-Stack React Projects now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.