With Rails and puma-dev I can easily have multiple projects on my dev machine running on different hosts e.g.
~/development/myapp => http://myapp.test
~/development/myapp2 => http://myapp2.test
~/development/myapp3 => http://myapp3.test
With NodeJS (NextJS etc.) it is
~/development/myapp => http://localhost:3000
~/development/myapp2 => http://localhost:3001
~/development/myapp3 => http://localhost:3003
And I have to manually run npm run dev
for each.
How do I get similar functionality to Rails and puma-dev please?
I have tried to edit /etc/hosts but am not clear on how to avoid having a port in the URL e.g. I don't want http://myapp.test:3000 nor do I want to run npm run dev
on port 80 or 8080.