Redirecting a GET request to another website using Express.js

I wanted to set up some pages on my website that redirect to my social network profiles. Since my website is currently running on node.js + express, I was able to use the redirect method that comes with express.js.

var express = require('express'),
    server = express();

server.get('/github/', function (req, res) {
    res.redirect(301, '');

The 301 response code lets search engines know that it is a permanent redirect.

Now, when I visit it will redirect to

more JavaScript posts