dryo98
January 12, 2021, 6:28pm
1
Hey guys I was trying to pop up my Home component, but it seems like the dev environment aims towards the index.js display the message in it’s route
const router = require(‘express’).Router();
router.get(’/’, (req, res, next) => {
res.status(200).json({ msg: ‘Working’ });
});
module.exports = router;
miku86
January 13, 2021, 7:50am
2
Hey there,
it would be great to see some running code or at least some code on github.
Because currently I don’t understand a lot about your problem.
Your code shows a route in your Express backend. I don’t understand how this connects to your React frontend, your Home component or index.js.
Please elaborate on this with some more code or the whole project.
2 Likes
dryo98
January 13, 2021, 4:25pm
3
miku, thank you for your answer, my back end and my front end dev environment were pointing at the same port, so they got mixed up, therefore it was showing my index.js, and you’re right should’ve shown some code.
system
Closed
July 15, 2021, 4:25am
4
This topic was automatically closed 182 days after the last reply. New replies are no longer allowed.