On November 21, 2014, Jon Friskics and Alyssa Nicoll broadcast a special live-coding edition of Code School Live. During the 90 minute broadcast, they started building a simple Swift app called NoteApp.
Jon and Alyssa were only able to get through building part of the app during the broadcast, so they created three versions of the project that are described below:
01-cs_live_version_2014-11-21
- This is the state of the code right after filming stopped. If you're following along with the Code School Live video recording, this is the one to look at.02-cs_live_followup_version
- We're planning on filming a follow-up that picks up where part01
left off where we walk through finishing the app.03-final_working_version
- If you're dying to see what the full final version looks like, check out this folder.
The final version of NoteApp uses a simple API with GET and POST endpoints for reading and "saving" notes. The app is built with node.js and the Express.js framework.
Here's a brief rundown on how to get it running:
- Install Homebrew.
- Install Node/NPM. This tutorial from Adam Stacoviak on The Change Log is a good quick one.
- Go to the
noteapp_api
folder in Terminal and typenpm install
. If it works, you should see a few NPM warnings about missing descriptions, repository fields, and a README file - that's OK. Underneath that you'll see a list of modules being installed with names likeexpress
andbody-parser
. These are installed intonoteapp_api/node_modules
- In the
noteapp_api
folder, typenode app.js
and hit Enter. You won't see anything after that, but if you open a web browser and enterhttp://localhost:8080/notes
, you should see[{"name":"Sample Note"}]
if things are working.
If the whole Node/Express.js thing is exciting and baffling to you, then you should definitely head over to Code School and take Real-time Web with Node.js and the upcoming Building Blocks of Express.js to learn how you can build an API like this yourself!