How to install/host TODOMVC application in order to test Rest in Vugen

  • KM01451710
  • 24-Mar-2015
  • 24-Mar-2015

Summary

This guide provides the steps to mount the TODOMVC application on your computer in order to test a RESTful Web Services application on your computer.

Question

Installing and deplying the TODOMVC application on your machine, you will need to follow the below steps:

Answer

  1. To install it you need to have node.js installed.
  2. Once installed extract the attached zip file to some directory. I will refer to this directory as "c:\todoMVC" but you can extract to any directory.
  3. Open the node.js command prompt (Start -> All Programs -> node.js -> node.js command prompt). A cmd window will open.
  4. In the opened cmd window go to the directory where you extracted the zip file (e.g. "cd c:\todoMVC").
  5. Type "npm install" (without the quotes) to download all the dependencies. If you are behind a proxy you will need to specify it using the --proxy flag (e.g. "npm install --proxy http://<your proxy>:<your port>").
  6. Must install the body-parse module separately, Type "npm install body-parser" (without the quotes). If you are behind a proxy you will need to specify it using the --proxy flag (e.g. "npm install body-parser --proxy http://<your proxy>:<your port>").
  7. Run the application server by typing "node app.js". You should see the text: "Listening on port 3000" appear in the console.
  8. Open your favorite browser (please don't use IE)  and type "localhost:3000" in the address bar. You should see the application running.
  9. To reset the application go back to the cmd window and press Control+C to stop it, then type "node app.js" to start it. Note that closing the browser does not restart the application as it runs in the cmd window and the browser is used to access it.