You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
32 lines
854 B
32 lines
854 B
// | ------------------------------------------------------------
|
|
// | @版本: version 0.1
|
|
// | @创建人: 【Nie-x7129】
|
|
// | @E-mail: x71291@outlook.com
|
|
// | @所在项目: fastify-template
|
|
// | @文件描述: index.js -
|
|
// | @创建时间: 2023-12-16 22:41
|
|
// | @更新时间: 2023-12-16 22:41
|
|
// | @修改记录:
|
|
// | -*-*-*- (时间--修改人--修改说明) -*-*-*-
|
|
// | =
|
|
// | ------------------------------------------------------------
|
|
|
|
import user from "./user/index.js";
|
|
export default function root(fastify, options, done){
|
|
|
|
fastify.decorate('a', 'xsaxsa')
|
|
fastify.get('/', function (request, reply){
|
|
console.log(this.a)
|
|
return {root: true}
|
|
})
|
|
|
|
fastify.get('/getName', function (request, reply){
|
|
return {root: true}
|
|
})
|
|
|
|
fastify.register(user, {
|
|
prefix: 'user'
|
|
})
|
|
|
|
done()
|
|
}
|
|
|