frontend page

This commit is contained in:
jysperm
2014-07-27 09:42:06 +08:00
parent 9f714428b5
commit 27ee4c5fc4
3 changed files with 8 additions and 2 deletions

View File

@@ -1,9 +1,13 @@
express = require 'express'
request = require 'request'
harp = require 'harp'
path = require 'path'
ical = require 'ical-generator'
app = express()
app.use harp.mount(path.join(__dirname, 'static'))
app.get '/:username', (req, res) ->
username = req.param 'username'
@@ -14,7 +18,7 @@ app.get '/:username', (req, res) ->
body = JSON.parse body
cal = ical()
cal.setDomain('github-commit-ical').setName("#{username} Commit History");
cal.setDomain('commit-calendar.newsbee.io').setName("#{username} Commit History")
for item in body
if item.type == 'PushEvent'

View File

@@ -18,6 +18,7 @@
"dependencies": {
"express": "*",
"request": "*",
"ical-generator": "*"
"ical-generator": "*",
"harp": "*"
}
}

1
static/index.jade Normal file
View File

@@ -0,0 +1 @@
p Hello World