|
|
|
@ -112,11 +112,21 @@ var express = require('express'),
|
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
app.create_route = function(url, tpl) { // to remove
|
|
|
|
|
return '<script>templates.ready(function(){ajaxify.go("' + url + '", null, "' + tpl + '");});</script>';
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
app.namespace(global.config.relative_path, function() {
|
|
|
|
|
|
|
|
|
|
auth.create_routes(app);
|
|
|
|
|
admin.create_routes(app);
|
|
|
|
|
userRoute.create_routes(app);
|
|
|
|
|
installRoute.create_routes(app);
|
|
|
|
|
testBed.create_routes(app);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
// Basic Routes (entirely client-side parsed, goal is to move the rest of the crap in this file into this one section)
|
|
|
|
|
(function() {
|
|
|
|
|
var routes = ['login', 'register', 'account', 'recent', 'popular', 'active', '403', '404'];
|
|
|
|
@ -139,17 +149,9 @@ var express = require('express'),
|
|
|
|
|
}
|
|
|
|
|
}());
|
|
|
|
|
|
|
|
|
|
// Complex Routes
|
|
|
|
|
app.namespace(global.config.relative_path, function() {
|
|
|
|
|
|
|
|
|
|
auth.create_routes(app);
|
|
|
|
|
admin.create_routes(app);
|
|
|
|
|
userRoute.create_routes(app);
|
|
|
|
|
installRoute.create_routes(app);
|
|
|
|
|
testBed.create_routes(app);
|
|
|
|
|
|
|
|
|
|
app.get('/', function(req, res) {
|
|
|
|
|
console.log('going in home');
|
|
|
|
|
|
|
|
|
|
categories.getAllCategories(function(returnData) {
|
|
|
|
|
res.send(
|
|
|
|
|
app.build_header(res) +
|
|
|
|
|