-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathrouter.js
72 lines (55 loc) · 2.15 KB
/
router.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
function setupRoutes(app) {
app.get('/auth/facebook', function(req,res) {
req.authenticate('facebook', function(error, authenticated) {
if(authenticated ) {
res.redirect('/index');
}
else {
res.end("<html><h1>Facebook authentication failed :( </h1></html>")
}
});
});
app.get('/', function(req, res){
res.render('skeleton', {locals: { title: "surfstream.tv", production: app.enabled("production"), fulljs: app.enabled("production") ? req.param("deebug", false) : true }});
});
app.get('/robots.txt', function(req, res) {
res.end('User-agent: *\nDisallow: /');
});
app.get('/:rID', function(req, res) {
res.render('skeleton', {locals: { title: "surfstream.tv", production: app.enabled("production"), fulljs: app.enabled("production") ? req.param("deebug", false) : true }});
});
app.get('/chat', function(req, res){
res.render('chat', { locals: {title: "surfstream.tv"}});
});
app.get('/chatcell', function(req, res){
res.render('chatcell', { locals: {title: "surfstream.tv"}});
});
app.get('/history', function(req, res){
res.render('historycell', { locals: {title: "surfstream.tv"}});
});
app.get('/sidebar', function(req, res){
res.render('sidebar', { locals: {title: "surfstream.tv"}});
});
app.get('/myplaylist', function(req, res){
res.render('myplaylist', { locals: {title: "surfstream.tv"}});
});
app.get('/playlistcell', function(req, res){
res.render('playlistcell', { locals: {title: "surfstream.tv"}});
});
app.get('/roominfo', function(req, res){
res.render('roominfo', { locals: {title: "surfstream.tv"}});
});
app.get('/share', function(req, res){
res.render('share', { locals: {title: "surfstream.tv"}});
});
app.get('/roomlist', function(req, res){
res.render('roomlist', { locals: {title: "surfstream.tv"}});
});
app.get('/topvideocell', function(req, res){
res.render('topvideocell', { locals: {title: "surfstream.tv"}});
});
app.get('/nowplaying', function(req, res){
res.render('nowplaying', { locals: {title: "surfstream.tv"}});
});
}
exports.setupRoutes = setupRoutes;