Starting Phoenix server in a different port than 4000


You would like start a phoenix application in a port different from the default 4000, by using something similar to the rails:


You will need to change the config/dev.exs file to include the following:

and then start the server with:

Taken from the answer here

Routing rspec with nested routes


You would like to add a routing rspec test in your rails application that tests for a nested route.
So while you have something like the following in your config/routes.rb file:

you want to add the following test for your route:

but you are getting an error like the following:


You will need to change your rspec to the following using any number for the user_id:

Solution adapted from here