SimonLeclere / discord-easy-dashboard

💻 Simple module to facilitate the creation of dashboard using discord.js and express
https://www.npmjs.com/package/discord-easy-dashboard
71 stars 11 forks source link

Update index.js #21

Closed HeCodes2Much closed 1 year ago

HeCodes2Much commented 2 years ago

Added a public: path/to/public/files to the config

SimonLeclere commented 2 years ago

Hey, did you test your code?

HeCodes2Much commented 2 years ago

ofc its running at http://bot.therepo.club

SimonLeclere commented 2 years ago

Hey, I just tested your code. I think it would be better if the "public" option was in the main theme file, so that the user doesn't have to worry about that when using a public theme.

const { join } = require("path");

const BASE_PATH = ".";

module.exports = {
    home: join(__dirname, BASE_PATH, "index.ejs"),
    guild: join(__dirname, BASE_PATH, "guild.ejs"),
    selector: join(__dirname, BASE_PATH, "selector.ejs"),
    commands: join(__dirname, BASE_PATH, "commands.ejs"),
    404: join(__dirname, BASE_PATH, "404.ejs"),
   publicFiles: join(__dirname,BASE_PATH, "public")
};
HeCodes2Much commented 2 years ago

ya that may work better :)