添加更多配置文件设置,实现了一个api,完成部分文件的部分测试
Some checks reported errors
continuous-integration/drone/push Build encountered an error
Some checks reported errors
continuous-integration/drone/push Build encountered an error
This commit is contained in:
@ -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) => {},
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user