We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 7bf710a commit 29d7c71Copy full SHA for 29d7c71
app/index.js
@@ -4,14 +4,18 @@ const express = require('express');
4
const app = express();
5
6
const {
7
- apiEndpoint
+ apiEndpoint,
8
} = require('../environment');
9
10
const frontend = require('./frontend');
11
const backend = require('./backend');
12
+app.use((req, res, next) => {
13
+ if (req.hostname === 'algo-visualizer.jasonpark.me') return res.redirect(301, 'http://algorithm-visualizer.org/');
14
+ next();
15
+});
16
app.use(apiEndpoint, backend);
17
app.use(history());
18
app.use(compression());
19
app.use(frontend);
20
-module.exports = app;
21
+module.exports = app;
0 commit comments