NodeGuy / server-date

Make the server's clock available in the browser.
http://www.nodeguy.com/serverdate/
Mozilla Public License 2.0
193 stars 52 forks source link

ServerDate.js fails to load when testing #14

Closed kylemcdonald closed 9 years ago

kylemcdonald commented 10 years ago

Steps to reproduce:

mkdir serverdate-test
cd serverdate-test
npm install serverdate
cp node_modules/serverdate/Node.js/* .
npm install
node server.js

Open in browser, e.g., http://localhost:51539

Open inspector and click Network tab, ServerDate.js says "(pending)" indefinitely.

Edit: I'm new to Node.js and Express.js, and it looks like I was expecting the wrong thing from this test example? I'm still not sure how to get the test running though.

NodeGuy commented 9 years ago

I'm sorry I didn't respond sooner; I just realized that I have to manually "watch" my own Github project to receive notifications.

The problem is that you didn't copy the whole file structure properly for the test to work.

Try this instead:

mkdir serverdate-test
cd serverdate-test
npm install serverdate
cd node_modules/serverdate/Node.js
npm install
node server.js