aboutsummaryrefslogtreecommitdiff
path: root/server.js
diff options
context:
space:
mode:
authorBobby <[email protected]>2022-06-25 18:27:00 +0530
committerBobby <[email protected]>2022-06-25 18:27:00 +0530
commit3ee390500beb3495ca25fe67a357e2ae38475569 (patch)
treeaba3f3900cd936883a70e235fe323abb1e54dda1 /server.js
parent806e6d2d78ef90f48727b86870bc75077b2474fe (diff)
downloadthatcomputerscientist-3ee390500beb3495ca25fe67a357e2ae38475569.tar.xz
thatcomputerscientist-3ee390500beb3495ca25fe67a357e2ae38475569.zip
setup dynamic subdomains and organize error pages
Diffstat (limited to 'server.js')
-rw-r--r--server.js7
1 files changed, 6 insertions, 1 deletions
diff --git a/server.js b/server.js
index dfc25a91..d0166128 100644
--- a/server.js
+++ b/server.js
@@ -7,8 +7,8 @@ const mysql = require("mysql2");
const app = express();
const port = process.env.PORT || 3000;
const connectionURL = process.env.DATABASE_URL;
-const validationString = process.env.AUTHORIZATION_STRING;
const cron = require("node-cron");
+const subdomains = require('wildcard-subdomains');
require("dotenv").config();
@@ -25,6 +25,11 @@ app.use(
);
app.use(flash());
+app.use(subdomains({
+ namespace: 'profile',
+ whitelist: ['www'],
+}))
+
// Set Template Engine
app.set("view engine", "ejs");