jononomo
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.
Trending in Questions
Other Trending 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
- #blog-post
- #phoenix_html
- #iex
- #graphql
- #ai
- #genstage
- #elixirconf-us
- #websockets
- #supervisor
- #advent-of-code
- #distillery
- #processes
- #api
- #forms
- #metaprogramming
- #security
- #hex











First 2 of 2 Posts
aswinmohanme
runtime: falsemeans the package will not be available in production. Combined withonly: :devmeans the package is available in development mode. This means you can generate the documentation only in the development and the build phase and the package won’t be available when the app is running in production mode.LostKobrakai
You shouldn’t need
ex_docin production. There are few ways to generate documentation e.g. when building a release. Make sure thedoc/folder is retained with the release (overlay or copy intopriv/) and then you can serve the docs usingPlug.Staticwithin phoenix.