ECharts.Phoenix.Plug (echarts v0.1.1)

Copy Markdown View Source

Serves the vendored ECharts bundles and the JavaScript clients.

Mount it in your router:

forward "/echarts", ECharts.Phoenix.Plug

This makes the files listed by ECharts.Assets.files/0 available under /echarts, for example /echarts/echarts.min.js and /echarts/echarts_hook.js.

The plug only serves an allowlist of bundled files. Unknown paths return 404, so it cannot be used to read arbitrary files.