Goal
To get the two Node.js programs running for you:
- PhoneNodeREST – a MySQL program that uses node.js with Express, with a RESTful interface
- socketChat – a full featured webchat program written with node.js and and socket.io
Resources
Steps
Step 1 – Get PhoneNodeREST setup and running.
- Clone the PhoneNodeREST
- Edit PhoneServer.js
– Change to database credentials to use your phone database
– Change the port to your port number (see Port Assignments) - Edit public/phoneApp.js
– Change port to your number - Add Express and mysql to your directory:
npm install express
npm install mysql2 - Run the program:
node PhoneServer.js - Go to the webpage: jimskon:90nn (where 90nn is your port number)
- Try it out!
Step 2 – Get socketChat setup and running
- Clone the socketChat project
- Edit chatApp.js
– Change the port to your port number (see Port Assignments) - Edit chatClient.js
– Change port to your number - Add socket.io to your directory by copying my node_modules. Also init npm (use default values):
npm init
cp -r ~skon/socketChat/node_modules . - Run the program:
node chatApp.js - Go to the webpage: jimskon:90nn (where 90nn is your port number)
- Try it out!
Turn in:
- Paths to your projects
- Links to your program (Run the PhoneApp in the background)
