添加更多配置文件设置,实现了一个api,完成部分文件的部分测试
Some checks reported errors
continuous-integration/drone/push Build encountered an error

This commit is contained in:
Qumolama.d
2022-05-03 18:57:20 +08:00
parent 3de6ad9a2a
commit 3b8712a212
14 changed files with 596 additions and 21 deletions

View File

@ -1,7 +1,8 @@
const defaultPrehandler = async function (req, rep) { }
export const config = {
database: {
url: 'mongodb://localhost:27017',
db: 'yggdrasil'
url: 'mongodb://localhost:27017/yggdrasil?readPreference=primary&appname=MongoDB%20Compass&directConnection=true&ssl=false',
},
server: {
port: 3000,
@ -10,5 +11,13 @@ export const config = {
signing: {
public: '/path/to/public.pem',
private: '/path/to/private.key'
},
custom: {
overridePrehandler: (url) => {
return defaultPrehandler
},
preHooks: (fastify) => {},
preRouting: (fastify) => {},
postRouting: (fastify) => {},
}
}
}