Cannot get / [ ]

Project Link:

I downloaded the initial code to do the above project and I was able to create routes and get json response on the browser for every route I have implemented as per the project. However I am not able to load the UI. Every time I run server.js I get an error Cannot get /

Finally I downloaded the solution file for the boss machine project and it also has the same problem. I tried adding a route app.get('/', (req, res) => { res.render(__dirname +'/index.html'); } and that loaded the index.html without any css and the react component is not attached to it.

Can you please suggest what I need to do load the UI as I would very much like to see the routes in action on the UI.


I found the same issue on Expresso project capstone-project-2-expresso-start and I guess I fixed it by running npm start to start the UI and node server.js to start the api. There were some modules that are not supported like browserHistory which lead to few hours of google search in finding alternatives.

Also had to install cors dependency as UI and API were running on two different ports, along with moving the css to the src folder.

These are the few of the steps that I took to see the UI and API in action together. If there is a totally different way or a better way to achieve this, please let me know.