Skip to content

Instantly share code, notes, and snippets.

View Craigson's full-sized avatar

Craig Pickard Craigson

View GitHub Profile
@Craigson
Craigson / package.json
Created July 24, 2020 03:52 — forked from adamreisnz/package.json
Simple pure npm scripts build process
{
"name": "project-name",
"description": "Template for static sites",
"version": "1.0.0",
"homepage": "http://www.project-name.com",
"author": {
"name": "Adam Reis",
"url": "http://adam.reis.nz"
},
"license": "UNLICENSED",
@Craigson
Craigson / README.md
Last active August 29, 2015 14:10 — forked from robynitp/README.md

Networked Media Week 5 Assignment

Craig Pickard

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