I followed the instructions to create a simple web server using Servi. The examples of server_v1.js and server_v2.js were good introductions for understanding the use of Route(), but I ran into some trouble when I was trying to access data inside of the object that I created.
The basic premise of the site is that it's a page for a sports team. I'm an avid football (soccer) supporter, so I created a VERY rudimentary page for Aresnal FC, who are based in London, England. The site has a simple homepage and a simple about page. I then created a simple HTML template for displaying the player profiles. The javascript file contains a JSON object that stores the data for each player. I then used "route('/profiles/:playerName', showProfiles);" as a way to display each players profile.
At present, the server is not working as terminal keeps reporting the following error when i try and run "node server_v3.js":
/root/server_v3.js:57 }); ^ SyntaxError: Unexpected token ) at Module._compile (module.js:439:25) at Object.Module._extensions..js (module.js:474:10) at Module.load (module.js:356:32) at Function.Module._load (module.js:312:12) at Function.Module.runMain (module.js:497:10) at startup (node.js:119:16) at node.js:906:3
I have gone through the code and can't seem to find the syntactical error anywhere, so for the moment I am stumped. You can view the code in the gists.
*As an additional exercise, I used git from the command line to clone and update my gists.
This is looking good. Please get in touch if you're still having trouble, and I can help you debug.