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
respondWithError (response, namespace, message, status) -> | |
status = 500 if status? | |
console.log namespace, message | |
response.send "Mising guid", status | |
handleDelete (request, response) -> | |
return respondWithError response, 'Blogs', 'Error - Missing guid in handleDelete', 400 if request.url.query.guid | |
getBlogByGuid request.url.query.guid, (err, blog) -> | |
return respondWithError(response, 'Blogs', 'Error in getBlogByGuid callback in handleDelete') if err |
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
require("colors"); | |
var red = "█".red; | |
var white = "█".white; | |
console.log(); | |
console.log([ | |
" ooooooooooooooooooo", | |
" oXXXXoXXXXooXXXXXXo", | |
" oXooXoXXoXooXXoXoXo", |
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
var http = require('http') | |
http.createServer(function (req,res) { | |
res.writeHead(200, {'Content-Type':'text/plain'}); | |
res.end('Hello World! \n'); | |
}).listen(1337,"127.0.0.1"); | |
console.log('Server running ar http://127.0.0.1:1337//'); |