fastify-serve-cli
v1.1.4
Published
fastify server
Downloads
17
Maintainers
Readme
fastify-serve-cli
封装fastify, 快速启动项目 未来还会封装更多命令,构建项目整个生态
安装
npm i fastify-serve-cli -D
或者
yarn fastify-serve-cli
pageage.json配置scripts
{
"scripts": {
"start": "fastify-serve-cli start",
"dev": "fastify-serve-cli dev",
"build": "fastify-serve-cli build"
}
}
项目根目录结构
以下文件会被自动挂载
|-package.json
|-.env 配置项目配置
|-src 开发目录
|-router 配置路由
|-...
|-plugins 配置插件,插件写法查阅fastify官方文档
|-...
|-helper 里面通过插件形式写fastify装饰器并自动挂载
|-...
...