Last active
July 3, 2016 20:28
-
-
Save petersirka/3604e5b2e8b521056aaeb7c214ad4c99 to your computer and use it in GitHub Desktop.
How to run Total.js without installation?
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 characters
function main() { | |
F.route('/', function() { | |
this.plain('HOMEPAGE'); | |
}); | |
// debug (development mode), release (production mode), test (testing mode) | |
F.http('debug'); | |
} | |
require('http').get('http://modules.totaljs.com/latest/total.js', function(res) { | |
var buffer = new Buffer(0); | |
res.on('data', (b) => buffer = Buffer.concat([buffer, b])); | |
res.on('end', () => main(eval(buffer.toString('utf8')))); | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment