During last few weeks I’ve promised many (mostly from HackerNews) that I would publish and open source an example application in Node.js using some of the techniques I’ve talked about. While in need of a little intellectual diversity from my normal role working 24/7 on my startup (http://www.exipe.com) I decided that making a twitter clone would be cool.
This morning I purchased the domain name nodrr.com (instead of tweet you nod … if that makes any sense … kind of a play on node.js + twitter + some physical action) for this purpose. It’s currently just after 4:15 PM on Saturday afternoon the East Coast of the US, I just went out Thursday night for a bit with friends so I’m not feeling all socially isolated by this, I just watched The Social Network (inspiration) and I’m feeling the need to code … lets make a Twitter clone in node.
I’ll be live blogging the whole time with edits, updates and battleplans. Please forgive my lack of attention to grammar/spelling/common sense English writing skills as I’ll be focusing on coding, not so much whether that use of ellipsis was correct. Watch my coding progress on github as well if you’d like: https://github.com/tglines/nodrr
4:25PM – First things first:
- Set up EC2 Micro Instance with Ubuntu 64-bit
- Set up git/github link on the EC2 instance
- Download and install Node.js, npm and some of the libraries I’ll be using
- Provision an AWS elastic IP and point nodrr.com at my EC2 instance
4:40PM – Box is up:
- EC2 is up, dns records are pointed to the elastic IP and we’re SSH’ed In
- Compiling node
5:10PM – Git project initialized, node built, npm installed.
- Grabbed express, connect-auth, mongoose, jade for now from npm
- Now installing mongodb packages
- Cue the Daft Punk
- Vote for the news item on HackerNews
5:35PM – Project directories setup, main script started … getting an unexpected error
- Grabbed a few more npm libs – connect-mongodb and connect-force-domain
- Getting and error with express.bodyDecoder() … hmmm
5:50 PM – Theres the bug … connect renamed bodydecoder to bodyparser
- Gotta keep up on this stuff – https://github.com/senchalabs/connect
- Back on track here
6:05 PM – Facebook Connect Setup
- Got oauth through npm
- Set up the app on facebook
- Jade template isn’t getting the title ….
6:10 PM – Battling a new one
6:23 PM – Hello World
- Got a hello world up (taking down now so dont check yet)
- Fixed the express.js local variable passing change … see my error above about the title
- Lets start putting in some real stuff here … auth/login … forms … all the good stufff
6:40 PM – Some Frontend
- Added a reset style sheet from yahoo and included style.css
- Included jquery from google’s cdn and a template main.js
6:55 PM – Dinner Break
- Be back in a bit
7:10 – Back @ it
- The buffalo chicken/cuscus was very tasty.
- Lets do a color scheme like: http://nodejs.org/
- Working on facebook login auth … we’ll later add more providers like twitter/github/google etc
7:30 PM – Once More Into the Breach
- Now Getting this error on redirect attempts: Error: Can’t set headers after they are sent.
8:10 PM – Redirect Problem = Solved For Now
- The redirect problem with facebook connect has now been solved
- After initial login with connect throwing the user to a make a username page.
8:45 PM – We Have Nods!
- The first nods are going in the database now, some serious securing to do
- Heres a screenshot:
9:05 PM – Stylin
- A little more style:
11:22 – Another Screenshot
- User Pages Much Better
- Need Pagination and character limits
12:18 – Check it Out: http://www.nodrr.com
- It works pretty decently but needs a lot of features to be more usable
- Please keep in mind that this was just a demo and proof of concept
- Check out my real startup @ www.exipe.com
- Time for bed.