Config: Redo config to be more straight to the point
This commit is contained in:
parent
67d85a9fc5
commit
fc2ae1a41e
@ -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;
|
||||
|
@ -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(),
|
||||
},
|
||||
|
Loading…
x
Reference in New Issue
Block a user