Config: Redo config to be more straight to the point

This commit is contained in:
Diego Magdaleno 2021-05-15 16:57:31 -05:00
parent 67d85a9fc5
commit fc2ae1a41e
2 changed files with 2 additions and 9 deletions

View File

@ -3,10 +3,9 @@ import Config from "../util/Config"
const router = Router();
const url = Config.get().server.root_url;
router.get("/", (req, res) => {
res.send({ url: `ws://${url}:3002` });
const { endpoint } = Config.getAll().gateway();
res.send({ url: endpoint || "ws://localhost:3002" });
});
export default router;

View File

@ -21,9 +21,6 @@ export interface RateLimitOptions {
}
export interface DefaultOptions {
server: {
root_url: string;
};
general: {
instance_id: string;
};
@ -111,9 +108,6 @@ export interface DefaultOptions {
}
export const DefaultOptions: DefaultOptions = {
server: {
root_url: "localhost" // we are localhost unless the oposite is specified
},
general: {
instance_id: Snowflake.generate(),
},