Created
August 7, 2012 01:25
scalac server sample
This file contains 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
{ | |
"name": "scalac", | |
"version": "0.0.1", | |
"description": "jsonified SCA calendar data", | |
"author": "Ang3lFir3", | |
"dependencies": { | |
"ical": "*" | |
}, | |
"engines": { | |
"node": ">= 0.6.0", | |
"npm": "1.1.41" | |
} | |
} |
This file contains 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'); | |
var ical = require('ical'); | |
http.createServer(function (req, res) { | |
res.writeHead(200, {'Content-Type': 'application/json'}); | |
ical.fromURL('http://antir.sca.org/Upcoming/allevents.ics',{}, | |
function(err, data){ | |
res.end(JSON.stringify(data)); | |
}); | |
}).listen(process.env.PORT); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment