James Carr » Blog Archive » Lessons Learned With My Recent Node.js App Recently I created a little web app for a friend’s conference to accept talk submissions and gather votes on those submissions to rank the top ones. For this task I used heroku’s node.js beta preview to host the application and a free couchone instance for the data store. Things were a bit rocky but I learned some important lessons that I thought I’d share. Tag your last successful heroku deployment While adding one additional feature for the site I reached a point where the app worked fine on my laptop but for reasons I couldn’t figure out for quite sometime it failed on heroku. Create a Staging Heroku Instance This helps catch errors arising from differences that might exist between your local machine and heroku. heroku config:add NODE_ENV=production This has become something that should go into every app now imho. Replicate Your CouchOne Instance In the 11th hour my main couchone instance crashed. As a node.js hosting platform, I still think Heroku is just kinda okay.
BigText Makes Text Big 11 January 2011Read this in about 3 minutes. *I like shortcuts: Fork BigText on Github or Check out the BigText Demo Wizard It all began with a simple web foray to Designing Monsters. Their simple, typographic design was beautiful. But why? At its simplest, the BigText jQuery plugin takes a single element and sizes the text inside of its child <div>s to fit the width of the parent element. <div id="bigtext" style="width: 300px"><div>The elusive</div><div>BIGTEXT</div><div>plugin exclusively</div><div>captured on film</div></div> $('#bigtext').bigtext(); Implementation Details The plugin itself is more than just a simple font-size incrementer. The BigText Demo Wizard This is where the magic happens. Editable text (contenteditable), and BigText will run on every keyup event to resize what you’re typing.Dynamic horizontal and vertical centering using Alex Russell’s Flex Box CSS classes (This is easy now, hooray!)