polygonal-base-api

base api used by polygonal app

Usage no npm install needed!

<script type="module">
  import polygonalBaseApi from 'https://cdn.skypack.dev/polygonal-base-api';
</script>

README

polygonal-base-api

该模块提供 polygonal app 后端工程的 基础插件。包含:

  • inert:Static file and directory handlers
  • vision:Templates rendering support
  • hapi-swagger:A swagger documentation UI generator plugin for hapi
  • blipp:Displays the routes table at startup
  • good:A logging plugin that supports output to console, file and udp/http endpoints
  • hapi-boom-decorators:Exposes boom errors through the hapi reply interface

使用

src/index.js 中注入插件

import plugins from 'polygonal-base-api';

register: [
  ...
  ...plugins,
],