jononomo
Running ex_doc for a Phoenix web application
So I have a Phoenix web application in progress. I am able to generate documentation for my codebase using the ex_doc tool – when I run mix docs I get the documentation output into the doc/ folder.
I can then open this doc/ folder, double click on index.html, and view these docs in my browser at file:///Users/jon/myapp/doc/api-reference.html (because index.html just redirects to api_reference.html).
However, I would like these docs to be part of my Phoenix web application – in other words, I would like them available in production at the domain where my app is running. So if my app is running at myapp.com, then I would like to be able to see the docs at a URL like 应用宝官网-全网最新最热手机应用游戏下载
Also, the documentation for ex_doc (ExDoc — ExDoc v0.40.3) instructs me to include the following in my mix.exs file:
def deps do
[
{:ex_doc, “~> 0.24”, only: :dev, runtime: false},
]
end
I’m curious what the runtime: false option does.
Thanks.
Marked As Solved
LostKobrakai
You shouldn’t need ex_doc in production. There are few ways to generate documentation e.g. when building a release. Make sure the doc/ folder is retained with the release (overlay or copy into priv/) and then you can serve the docs using Plug.Static within phoenix.
Popular in Questions
Other popular topics
Categories:
Sub Categories:
Forums
Popular Tags
- #ecto
- #liveview
- #troubleshooting
- #learning-elixir
- #deployment
- #library
- #erlang
- #testing
- #genserver
- #mix
- #absinthe
- #remote-other
- #otp
- #plug
- #how-to-question
- #macros
- #postgres
- #channels
- #elixirconf
- #exunit
- #discussion
- #code-sync
- #javascript
- #podcasts
- #onsite
- #dialyzer
- #docker
- #authentication
- #umbrella
- #full-time-contract
- #podcasts-by-brainlid
- #ecto-query
- #elixir-ls
- #phoenix_html
- #iex
- #blog-post
- #graphql
- #genstage
- #ai
- #websockets
- #supervisor
- #advent-of-code
- #elixirconf-us
- #distillery
- #processes
- #forms
- #api
- #metaprogramming
- #security
- #performance








