Skip to content
This repository has been archived by the owner on Feb 9, 2018. It is now read-only.

Commit

Permalink
I dinnae ken
Browse files Browse the repository at this point in the history
  • Loading branch information
simpsonjulian committed Nov 11, 2014
1 parent 62a84f4 commit 2b5e7e9
Showing 1 changed file with 8 additions and 6 deletions.
14 changes: 8 additions & 6 deletions app.js
Original file line number Diff line number Diff line change
Expand Up @@ -368,6 +368,7 @@ function route_get(url, fun) {
}

/////// ROUTING ///////
console.log('processing routing');

route_get('/', forward("http://neo4j.com/", 301));
/*
Expand Down Expand Up @@ -477,8 +478,8 @@ page_handling.init(app,app.locals.pages);

mylog.init(app);

twitter.load_tweets(app,10*60*1000);
twitter.add_tweet_route("/api/tweets",app);
//twitter.load_tweets(app,10*60*1000);
//twitter.add_tweet_route("/api/tweets",app);

munchkin.add_route('/api/marketo',app);
meetup.add_route("/api/meetup",app);
Expand Down Expand Up @@ -573,15 +574,16 @@ route_get('/graphgist', function (req, res) {
});

// todo redirect to our video content page
/*
route_get('/video/*', function (req, res) {
var path = req.path;
var idx = path.lastIndexOf('/');
var file = idx > -1 ? path.substring(idx + 1, path.length) : path;
// console.log('got request for ', path, ' from ', req.header('Referer'));
res.redirect('http://watch.neo4j.org/video/' + file);
});


*/
/*
route_get('/api/sitemap.csv', function (req, res) {
function quote(value) {
if (value == null || value == "") return "";
Expand All @@ -605,6 +607,7 @@ route_get('/api/sitemap.csv', function (req, res) {
}
res.send(result.join("\n"));
});
*/

route_get('/*/', function (req, res) {
var path = req.path.substring(0, req.path.length - 1);
Expand Down Expand Up @@ -638,6 +641,7 @@ route_get('/develop/ruby', forward('http://neo4j.com/developer/ruby/'
route_get('/develop/visualize', forward('http://neo4j.com/developer/guide-data-visualization/', 301));
route_get('/download/other_versions', forward('http://neo4j.com/download/', 301));
route_get('/training', forward('http://neo4j.com/graphacademy/', 301));
console.log('finished routing');

app.use(function (req, res, next) {
if ('/robots.txt' == req.url) {
Expand All @@ -647,8 +651,6 @@ app.use(function (req, res, next) {
next();
}
});

http.createServer(app).listen(app.get('port'), function () {

console.log("Express server listening on port " + app.get('port'));
});

0 comments on commit 2b5e7e9

Please sign in to comment.