Some months ago, I wrote a Twitter bot that delivers a random fortune-cookie quote/saying every 6 hours. (It's @CollectedQuotes, if you'd like to follow it.) Well, what better example could I adapt as a simple service in node.js? Here we go, short and sweet (click images to enlarge)...
Here's the source code:
Here's the (very simple) browser page it generates:
Here's the 404 response to any URL request other than the root:
Finally, here's the console log:
It might be clunky, but it works! If you'd like to play with this, you can download the JavaScript source and the fortune-cookie file.
1 comment:
Awesome!
Post a Comment