I have configured the express app to send the template HTML when the root is accessed
app.get('/', (req, res) => { res.status(200).send(template()); })
However, when I try to access routes such as '/users', '/profile' it goes to the backend and I get the error 'cannot GET/users' because this isn't a backend route.
In the first few chapters of the book, while building the social media app this is how it was indicated to go about it. Why isn't the router working with the given information in the book.
Currently I cannot render the specific pages by directly entering the URL or reloading. I have to go to the root and click a linked button
Closing this because Ive seen it is explained later in the book. The way the tutorial is laid out it appeared the routing was supposed to work on its own
I have configured the express app to send the template HTML when the root is accessed
app.get('/', (req, res) => { res.status(200).send(template()); })
However, when I try to access routes such as '/users', '/profile' it goes to the backend and I get the error 'cannot GET/users' because this isn't a backend route.In the first few chapters of the book, while building the social media app this is how it was indicated to go about it. Why isn't the router working with the given information in the book. Currently I cannot render the specific pages by directly entering the URL or reloading. I have to go to the root and click a linked button