const express = require("express");
const enforce = require("express-sslify");
const languages = require("./libraries.json");
const app = express();

app.set("view engine", "pug");
app.set("views", __dirname + "/views/website");

if (process.env.NODE_ENV === "production") {
    console.log("Redirecting to TLS endpoint.");
    app.use(
        enforce.HTTPS({
            // Required for proper use under a reverse proxy (Heroku, etc.).
            trustProtoHeader: true,
        })
    );
}

// app.use(fetchGithubStars);
app.use(express.static("dist/website"));
app.get("/", function(req, res) {
    res.render("index", { test: "This is a test", languages: languages });
});

// Fallback for the homepage JWT handbook CTA A/B experiment we ran
app.get("/home", function(req, res) {
    res.redirect("/");
});

app.listen(process.env.PORT || 3000, function() {
    console.log("Started.");
});
@@ -623,54 +623,113 @@
 , %7B 
-test: %22This is a test%22, languages: languages %7D
+languages: languages %7D);%0A%7D);%0A%0Aapp.get(%22/introduction%22, function(req, res) %7B%0A    res.render(%22introduction%22
 );%0A%7D

Fix introductions page