Created
December 18, 2012 03:24
-
-
Save anonymous/4324737 to your computer and use it in GitHub Desktop.
Revisions
-
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,30 @@ ### # Learning some Node/Express/Coffeescript :> ### express = require 'express' app = express() nouns = [ 'ali', 'pranav', 'wylie', 'spencer', 'dnb', 'cba', 'thang', 'DDS', 'leebot' ] adjectives = [ 'smelly', 'awesome', 'in need of a rewrite', 'lazy', 'inefficient', 'radiant' ] random = (array) -> index = Math.floor(Math.random()*array.length) array[index] app.get '/', (req, res) -> noun = random nouns adjective = random adjectives sentence = noun + ' is ' + adjective res.send sentence console.log 'You should hit up 0.0.0.0:3000' app.listen 3000