
GumptionWare
Programming Phoenix LiveView: Path for UserAuthLive and WrongLive modules. (Page 57)
I’m seeing auth/pento/lib/pento_web/live/user_auth_live.ext
at the top of the prompt to add this module.
When I started typing this question, I thought I had found an error. Actually, I discovered that I was not following your instructions precisely. This does raise a newbie question:
I get how the top-level of the paths in this chapter is auth
(because you happened to create this example project from that auth
location), but I had not previously noticed the live
after pento_web
. I noticed that this matches the path shown on page 56 for the illustration about updating the wrong_live.ex' module--so I went back to Chapter 1 and realized that I had omitted that
live` folder when I created the WrongLive module initially.
Nevertheless, my implementation is working (mostly) fine, so my newbie question is: Is this path structure (with live
) a convention/idiomatic, or is it a personal choice of the developer–or is it functionally important to LiveView and I just haven’t noticed how my implementation is broken?
Marked As Solved

SophieDeBenedetto
Hi @GumptionWare! If your live view was working even without being nested in a live
folder, then I’d say that the location of live views in live/
is not technically required. It is however the proper convention and when you generate a Phoenix app with live view, you will see that the live
folder is created for you.
Popular Prag Prog topics









Modern front-end development for Rails, second edition - Struggling to get the first chapter to work

Other popular topics










Latest in PragProg
Latest (all)
Categories:
Popular Portals
- /elixir
- /rust
- /wasm
- /ruby
- /erlang
- /phoenix
- /keyboards
- /js
- /rails
- /python
- /security
- /go
- /swift
- /vim
- /clojure
- /java
- /haskell
- /emacs
- /svelte
- /onivim
- /typescript
- /crystal
- /c-plus-plus
- /tailwind
- /kotlin
- /gleam
- /react
- /flutter
- /elm
- /ocaml
- /vscode
- /opensuse
- /ash
- /centos
- /php
- /deepseek
- /zig
- /scala
- /html
- /debian
- /nixos
- /lisp
- /agda
- /sublime-text
- /textmate
- /react-native
- /kubuntu
- /arch-linux
- /revery
- /ubuntu
- /manjaro
- /spring
- /django
- /diversity
- /nodejs
- /lua
- /slackware
- /julia
- /c
- /neovim