Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Why port 3000 is defaultly selecting in ruby-on-rails

If I specify port number separately the specified port number working.

rails s -p 3005 now its working with localhost:3005

But when i use - rails s - it running as localhost:3000.

why ruby-on-rails choosing default port is 3000.

like image 706
suresh.g Avatar asked Jan 15 '23 09:01

suresh.g


2 Answers

It really doesn't matter which port (as long as it's above 1024 (those below are privileged ports and you must be root to use them).

If you don't like port 3000 you can change it How to change Rails 3 server default port in develoment?

like image 63
graudeejs Avatar answered Jan 31 '23 00:01

graudeejs


The Rails server has a few default options, one of which is port 3000. If you don't explicitly set one of these settings, it will use the defaults defined there.

like image 33
Peter Brown Avatar answered Jan 31 '23 00:01

Peter Brown