Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Ran into the weirdest problem loading static files, but rebuilding the server piece by piece until it exactly matched the first attempt made it go away. I have no idea what was broken.
- Loading branch information
Showing
9 changed files
with
91 additions
and
0 deletions.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
node_modules/ | ||
config_env |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
web: node githud.js |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
exports.init = function(app) { | ||
app.get('/', function(req, res) { | ||
res.render('index.ejs'); | ||
}); | ||
}; |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
var express = require('express') | ||
, everyauth = require('everyauth') | ||
, routes = require('./routes') | ||
; | ||
|
||
var app = express.createServer(); | ||
app.configure(function() { | ||
app.use(express.logger()); | ||
app.use(express.bodyParser()); | ||
app.use(express.cookieParser()); | ||
app.use(express.session({ | ||
secret: process.env.SESSION_SECRET | ||
})); | ||
app.use(everyauth.middleware()); | ||
app.use(express.static(__dirname + "/../public")); | ||
}); | ||
|
||
app.configure('development', function() { | ||
app.use(express.errorHandler({ | ||
dumpExceptions: true, | ||
showStack: true | ||
})); | ||
}); | ||
|
||
everyauth.helpExpress(app); | ||
routes.init(app); | ||
|
||
var port = process.env.PORT || 4483; | ||
app.listen(port, function() { | ||
console.log("HUD up on", port); | ||
}); |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
var server = require('./app/server'); |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
{ | ||
"author": "Kristján Pétursson <kristjan@gmail.com>", | ||
"name": "GitHud", | ||
"description": "A JavaScript layer on top of GitHub Issues", | ||
"version": "0.0.1", | ||
|
||
"repository": { | ||
"url": "https://github.com/kristjan/githud" | ||
}, | ||
|
||
"engines": { | ||
"node": ">0.6.5" | ||
}, | ||
|
||
"dependencies": { | ||
"ejs" : ">=0.7.1", | ||
"everyauth": ">=0.2.30", | ||
"express" : ">=2.5.8" | ||
}, | ||
|
||
"devDependencies": {}, | ||
"optionalDependencies": {} | ||
} |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
if (typeof GitHUD === 'undefined') GitHUD = {}; | ||
|
||
GitHUD.Core = (function() { | ||
function init() { | ||
console.log("OK"); | ||
} | ||
|
||
return { | ||
init : init | ||
}; | ||
})(); | ||
|
||
$(GitHUD.Core.init); |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
OK |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
<!DOCTYPE html> | ||
<html> | ||
<head> | ||
<title>GitHUD</title> | ||
</head> | ||
<body> | ||
<h1>GitHUD</h1> | ||
<%= body %> | ||
</body> | ||
<script type="text/javascript" | ||
src="https://ajax.googleapis.com/ajax/libs/jquery/1.7.2/jquery.min.js"> | ||
</script> | ||
<script type="text/javascript" src="/js/githud.js"></script> | ||
</html> |