Browse Source

fix for keybase.txt

master
hokkqi 1 week ago
parent
commit
8ff44c094a
1 changed files with 12 additions and 5 deletions
  1. +12
    -5
      server.js

+ 12
- 5
server.js View File

@@ -8,6 +8,7 @@ const morgan = require("morgan");
const chalk = require("chalk");
const hbs = require("express-handlebars");
let social = require("./socials");
let fs = require("fs");
const con = require("./constants");
let { port } = {
@@ -95,11 +96,17 @@ module.exports = (client) => {
// ! Keybase
app.get("/keybase.txt", async (req, res) => {
console.log(req.hostname);
if (req.hostname === "werewolf.computer") {
res.type("text/plain");
return res.sendFile("/assets/files/keybase-werewolf_computer.txt");
} else return;
switch (req.hostname) {
case "werewolf.computer":
return res.sendFile(
`${__dirname}/assets/files/keybase-werewolf_computer.txt`
);
break;
default:
res.send("Nothing here.");
break;
}
});
app.listen(port /* , hostname */, () => {


Loading…
Cancel
Save