@aiao/universal-fastify-engine

universal fastify engine

Usage no npm install needed!

<script type="module">
  import aiaoUniversalFastifyEngine from 'https://cdn.skypack.dev/@aiao/universal-fastify-engine';
</script>

README

@aiao/universal-fastify-engine

npm

fastify 支持 Angular universal 的 engine 支持多语言环境

Use Case

SSR

Install

yarn add @aiao/universal-fastify-engine

Usage

参考 apps/dev-universal-fastify-engine

API

NgSetupOptions

属性 类型 说明
bootstrap Function Angular 的服务模块(AppServerModule
distPath string Angular 项目的输出目录
defaultLocale? string Angular 的默认语言 locale
document? string Angular index.html 的字符串
documentFilePath? string Angular index.html 的路径
locales? string[] Angular 发布的多语言
providers? StaticProvider[] 默认的 providers

RenderOptions

属性 类型 说明
locale? string 指定渲染语言
document? string 指定渲染 index.html 的字符串
providers? StaticProvider[] 指定 providers
disableSend? boolean 关闭默认发送方法,可自定义渲染后的 index.html 内容返回