Fastify-template-server快速启动的Fastify模板服务器

如果你在找一个简单、快速上手的 Fastify 模板服务器,fastify-template-server 绝对挺适合你的。这个模板为你了一个基础的 Fastify 服务器架构,轻松启动,方便分叉。你可以在 controllers 文件夹里快速添加路由,构建自己的 API,而且代码结构清晰,扩展性强。对了,项目里还配有测试文件,确保你能做到高覆盖率(100%,你也可以根据需求调整)。
模板包含了两种 Dockerfile,一个是开发用的 Dockerfile.dev,一个是生产用的 Dockerfile。而且 .env.production.env.dev 文件也已经准备好,你可以根据运行环境切换配置。
用法也简单:先运行 npm install 安装依赖,再用 npm run start 启动,或者用 docker build 构建 Docker 镜像,完全不复杂。如果你需要一个快速搭建的后端模板,可以试试看这个,挺省事的。

zip
fastify-template-server-master.zip 预估大小:32个文件
folder
fastify-template-server-master 文件夹
file
Dockerfile 468B
file
.gitignore 27B
folder
__mocks__ 文件夹
file
fastify.ts 877B
file
tsconfig.json 546B
file
README.md 2KB
folder
.github 文件夹
folder
workflows 文件夹
file
auto-merge.yml 828B
file
dependabot.yml 319B
file
.env.dev 26B
file
LICENSE 1KB
file
.dockerignore 68B
file
package.json 2KB
folder
src 文件夹
folder
__mocks__ 文件夹
file
routes.ts 113B
folder
utils 文件夹
folder
__mocks__ 文件夹
file
logger.ts 113B
file
config.spec.ts 2KB
file
config.ts 740B
file
logger.ts 121B
file
server.ts 2KB
file
server.spec.ts 3KB
file
routes.ts 236B
folder
controllers 文件夹
folder
template 文件夹
file
controller.ts 365B
file
template.schema.ts 320B
file
index.ts 432B
file
controller.spec.ts 594B
file
index.ts 280B
file
.env.production 26B
file
index.ts 57B
file
.eslintignore 57B
file
.travis.yml 260B
file
.editorconfig 242B
file
.eslintrc.js 1KB
file
Dockerfile.dev 113B
file
docker_push 137B
zip 文件大小:16.51KB