mirror of
https://github.com/HackPlan/github-commit-ical.git
synced 2026-01-12 15:04:45 +08:00
frontend page
This commit is contained in:
@@ -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'
|
||||
|
||||
@@ -18,6 +18,7 @@
|
||||
"dependencies": {
|
||||
"express": "*",
|
||||
"request": "*",
|
||||
"ical-generator": "*"
|
||||
"ical-generator": "*",
|
||||
"harp": "*"
|
||||
}
|
||||
}
|
||||
1
static/index.jade
Normal file
1
static/index.jade
Normal file
@@ -0,0 +1 @@
|
||||
p Hello World
|
||||
Reference in New Issue
Block a user