Some exercises from the Falsy Values workshops.
The good parts:
- HTTP server and client in same script
- Express cookies example
- Express routing example
- Express error handling
- Express middlewares example
- Simple HTTP proxy
Some exercises from the Falsy Values workshops.
The good parts:
| msg = "world" | |
| inv = "you" | |
| show_message = (x,y) -> | |
| $('#message').hide().text(x).fadeIn(1000, | |
| -> $('#message').append('!') | |
| ) | |
| $('#hint').hide().text(x).fadeIn(0) | |
This is now an actual repo:
| echo 'export PATH=$HOME/local/bin:$PATH' >> ~/.bashrc | |
| . ~/.bashrc | |
| mkdir ~/local | |
| mkdir ~/node-latest-install | |
| cd ~/node-latest-install | |
| curl http://nodejs.org/dist/node-latest.tar.gz | tar xz --strip-components=1 | |
| ./configure --prefix=~/local | |
| make install # ok, fine, this step probably takes more than 30 seconds... | |
| curl https://www.npmjs.org/install.sh | sh |
| #!/usr/bin/env node | |
| var YUI = require("yui3").YUI; | |
| YUI({ | |
| debug: true | |
| }).use('node', 'io', function(Y) { | |
| //Messing with the main page.. | |
| Y.one('title').set('innerHTML', 'Digg News Headlines'); |