fbpx

18 Mar /Rename a Phoenix Application

Posted by Alex Miller

When we build a Phoenix application with $ mix phoenix.new my_app, our application module name is set to MyApp. This module name, as well as the snake case version, is referenced everywhere, making it very cumbersome if you need to ever rename the application. Here is a shell script I wrote the does the job in less than a second. Just make the script executable and run it by passing a snake case version of the new name for your application. You will be shown a preview and asked to confirm before proceeding.