News for hackers. Stuff that matters.
Re:Root Domain Support for Amazon S3 Website Hosting by fruchtose on Friday December 28, 2012 @04:05AM (#4977057)
I'm doing pretty close to what you describe, with a few minor differences. I have a single-page playlist app for YouTube and SoundCloud called Muxamp [1] that runs on Node.js. The site is served as static HTML/JS/CSS right now, using JavaScript for all the heavy lifting. All requests go to a REST API--JSON in, JSON out. When a playlist is requested (static data), the server checks a cache, then checks the DB. Data is turned into JSON and sent over the wire.

I'm currently doing a rewrite in Backbone, which is extremely amenable to this kind of design. Unit testing so far has been pretty painless, too. Creating a new server instance is as easy as calling a function to get a server object with the endpoints specified. Start the server in setup, close it in teardown. Node.js makes this stuff super easy to automate, provided you can learn to live with callbacks and promises.

[1] Example playlist: http://muxamp.com/1776

There are no comments on this comment yet.