JSPM

  • ESM via JSPM
  • ES Module Entrypoint
  • Export Map
  • Keywords
  • License
  • Repository URL
  • TypeScript Types
  • README
  • Created
  • Published
  • 0
  • Score
    100M100P100Q38106F
  • License MIT

fastify server

Package Exports

  • fastify-serve-cli
  • fastify-serve-cli/bin/main.js

This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (fastify-serve-cli) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.

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装饰器并自动挂载
    |-...
  ...