lsp-yggdrasil/src/config.js

66 lines
2.2 KiB
JavaScript
Raw Permalink Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

export const config = {
database: { // MONGODB IS THE BEST DATABASE
url: '您的mongodb链接',
},
server: {
port: 30,
skinDomain: [ "assets.lama.icu", 'textures.minecraft.net' ],
serverName: "老色批世界树",
advanced: { // 详情可见 -> https://github.com/yushijinhun/authlib-injector/wiki/Yggdrasil-%E6%9C%8D%E5%8A%A1%E7%AB%AF%E6%8A%80%E6%9C%AF%E8%A7%84%E8%8C%83#meta-%E4%B8%AD%E7%9A%84%E5%85%83%E6%95%B0%E6%8D%AE
links: {
homepage: "",
register: ""
},
"feature.non_email_login": false,
"feature.legojang_namespace": false,
"feature.enable_mojang_anti_features": false,
"feature.enable_profile_key": false
}
},
storage: {
endpoint: "",
bucket: "",
key: "",
secret: "",
extra: { // these configs will pass to s3client directly
region: 'us-ashburn-02',
forcePathStyle: true,
signatureVersion: 'v4',
}
},
signing: { // 签名材质信息使用
public: 'public.pem',
private: 'private.key'
},
custom: {
override: { // 使用这个来覆写一个路径的处理器使用function而不是箭头函数可以用this访问fastify server
preHandler: {
/*
"/example/route": async function(req, rep) {}
*/
},
handler: {
/*
"/example/route": async function(req, rep) {}
*/
}
},
preHooks: (fastify) => {}, // 在这里添加自定义hook
preRouting: (fastify) => {}, // 在这里添加自定义路由
postRouting: (fastify) => {}, // 我也不知道你在这里写了有啥用...
},
telegram: {
disable: undefined, // 设置为任意非null、undefined、false、0、""等值可以设置为true就禁用了则禁用telegram功能
token: '你的telegrambot的apitoken',
}
}
export function getOverrideHandler(route) {
return config.custom.override.handler[route]
}
export function getOverridePreHandler(route) {
return config.custom.override.preHandler[route]
}