diff --git a/app.coffee b/app.coffee index d682d0b..fff0dec 100644 --- a/app.coffee +++ b/app.coffee @@ -33,15 +33,15 @@ app.configure 'production', -> app.use express.errorHandler() # Routes -app.get '/', (req, res) -> +app.get '/issues', (req, res) -> https.request(options, (response) -> if response.statusCode is 200 - str = "" - response.on "data", (chunk) -> str += chunk + json = "" + response.on "data", (chunk) -> json += chunk response.on "end", -> - res.render 'index', - 'issues': str + res.render 'issues', + 'issues': JSON.parse json , (html) -> res.send html, 'Content-Type': 'text/html', 200 ).end() diff --git a/index.html b/index.html deleted file mode 100644 index 3d7bf63..0000000 --- a/index.html +++ /dev/null @@ -1,228 +0,0 @@ - - -
- - - -# | -Date | -Title | -Description | -Amount Due | -Actions | -- |
---|---|---|---|---|---|---|
1 | -4/3/12 | -Yammer-Design | -Design new logo for Yammer.Inc | -$450 | -
-
-
-
-
-
- |
- - |
2 | -4/3/12 | -Yammer-Design | -Design new logo for Yammer.Inc | -$450 | -
-
-
-
-
-
- |
- - |
3 | -4/3/12 | -Yammer-Design | -Design new logo for Yammer.Inc | -$450 | -
-
-
-
-
-
- |
- - |
4 | -4/3/12 | -Yammer-Design | -Design new logo for Yammer.Inc | -$450 | -
-
-
-
-
-
- |
- - |
5 | -4/3/12 | -Yammer-Design | -Design new logo for Yammer.Inc | -$450 | -
-
-
-
-
-
- |
- - |
6 | -4/3/12 | -Yammer-Design | -Design new logo for Yammer.Inc | -$450 | -
-
-
-
-
-
- |
- - |
7 | -4/3/12 | -Yammer-Design | -Design new logo for Yammer.Inc | -$450 | -
-
-
-
-
-
- |
- - |
8 | -4/3/12 | -Yammer-Design | -Design new logo for Yammer.Inc | -$450 | -
-
-
-
-
-
- |
- - |
9 | -4/3/12 | -Yammer-Design | -Design new logo for Yammer.Inc | -$450 | -
-
-
-
-
-
- |
- - |
10 | -4/3/12 | -Yammer-Design | -Design new logo for Yammer.Inc | -$450 | -
-
-
-
-
-
- |
- - |
Welcome to Express
-<%- @issues %>
-
-
\ No newline at end of file
diff --git a/templates/issues.eco b/templates/issues.eco
new file mode 100644
index 0000000..4677e74
--- /dev/null
+++ b/templates/issues.eco
@@ -0,0 +1,93 @@
+
+
+
+
+
+
+ # | +Title | +Opened | +Updated | +Opened By | +Assigned To | +Actions | +
---|---|---|---|---|---|---|
<%= issue.number %> | +<%= issue.title %> | +<%= issue.created_at %> | +<%= issue.updated_at %> | +<%= issue.user.login %> | +<%= issue.assignee?.login %> | ++ + + + | +