Reputation: 4079
I just started learning RoR as a backend technology for React. I came across a tutorial that uses 'react-rails' and it chooses the localhost port number to be 3000 for my development environment by default.
Is there any way to change this default port number?
Upvotes: 0
Views: 6247
Reputation: 2727
The below mentioned link will help you regarding the port and address while running rails server
Change my default localhost port in Rails 5.
Upvotes: 0
Reputation: 6531
In development environment(local machine) you can not use port number below 1024
To start rails server on different port: -
rails s -p 5000 #or you can set your own port (> 1024)
Or to start is on port 80 or less than 1024:-
rvmsudo rails server -p 80
Upvotes: 1