spee.ch/server/routes/pages/index.js

14 lines
532 B
JavaScript
Raw Normal View History

2018-03-29 20:40:47 +02:00
const handlePageRequest = require('./sendReactApp');
const handleEmbedRequest = require('./sendEmbedPage');
2018-03-29 18:48:32 +02:00
const redirect = require('./redirect');
2018-03-29 20:40:47 +02:00
module.exports = (app) => {
app.get('/', handlePageRequest);
app.get('/login', handlePageRequest);
app.get('/about', handlePageRequest);
app.get('/trending', redirect('/popular'));
app.get('/popular', handlePageRequest);
app.get('/new', handlePageRequest);
app.get('/embed/:claimId/:name', handleEmbedRequest); // route to send embedable video player (for twitter)
2018-03-29 18:48:32 +02:00
};