Phoenix development via iex

Hi,

I am starting developing web pages in phoenix.
now, how do I change attributes in my project using the iex repl? for example, lets say I want to add a

tag, instead of changing directly in the html file, can I do it in iex? or if I want to add another plug, can I do it in iex? any example would be great. thanks

Not really. You change the file and hopefully you have the reloader configured and the page updates or refreshes.

Technically, you can rewrite modules in IEx but it would be a terrible workflow compared to just editing the file.

1 Like

If you’re a fan interactive REPL driven development, iex does provide some handy helper functions.

With your configured editor of choice, open/0 will open the current pry/breakpoint location while open/1 will open and jump to any given module, function, or line in file.

There’s also r/1 that will recompile and reload a specific module.

2 Likes