|
|
|
@ -13,6 +13,14 @@ const bhttp = require("bhttp");
|
|
|
|
|
const createError = require("create-error");
|
|
|
|
|
const { ValidationError, validateValue, required, isString } = require("validatem");
|
|
|
|
|
|
|
|
|
|
require('@babel/register')({
|
|
|
|
|
extensions: [".jsx"],
|
|
|
|
|
presets: [
|
|
|
|
|
require.resolve("@babel/preset-react"),
|
|
|
|
|
[require.resolve("@babel/preset-env"), { targets: { node: "current" } }]
|
|
|
|
|
]
|
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
let UpstreamError = createError("UpstreamError");
|
|
|
|
|
|
|
|
|
|
function generateSince(hostname, token) {
|
|
|
|
@ -26,7 +34,7 @@ let app = express();
|
|
|
|
|
|
|
|
|
|
app.set("views", path.join(__dirname, "../views"));
|
|
|
|
|
app.set("view engine", "jsx");
|
|
|
|
|
app.engine("jsx", expressReactViews.createEngine());
|
|
|
|
|
app.engine("jsx", expressReactViews.createEngine({ transformViews: false }));
|
|
|
|
|
|
|
|
|
|
app.use(express.static(path.join(__dirname, "../public")));
|
|
|
|
|
|
|
|
|
|