diff options
| author | Bobby <[email protected]> | 2022-06-25 18:27:00 +0530 |
|---|---|---|
| committer | Bobby <[email protected]> | 2022-06-25 18:27:00 +0530 |
| commit | 3ee390500beb3495ca25fe67a357e2ae38475569 (patch) | |
| tree | aba3f3900cd936883a70e235fe323abb1e54dda1 /server.js | |
| parent | 806e6d2d78ef90f48727b86870bc75077b2474fe (diff) | |
| download | thatcomputerscientist-3ee390500beb3495ca25fe67a357e2ae38475569.tar.xz thatcomputerscientist-3ee390500beb3495ca25fe67a357e2ae38475569.zip | |
setup dynamic subdomains and organize error pages
Diffstat (limited to 'server.js')
| -rw-r--r-- | server.js | 7 |
1 files changed, 6 insertions, 1 deletions
@@ -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"); |
