UNPKG

monorepo-cli

Version:

基于 yarn v2 berry 的 monorepo 项目的创建

22 lines (17 loc) 458 B
const fastify = require('fastify'); const config = require('../config'); // automatically build and tear down our instance function build() { const app = fastify(); app.register(require('fastify-bookshelf'), { connection: config.mysql, models: ['xq', 'chef'], }); app.register(async (Server) => { Server.register(require('../routes/api'), { prefix: '/api' }); }); return app; } module.exports = { build, };