0

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?

Raj
  • 3,637
  • 8
  • 29
  • 52

2 Answers2

1

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
Anand
  • 6,457
  • 3
  • 12
  • 26
0

The below mentioned link will help you regarding the port and address while running rails server

Change my default localhost port in Rails 5.

Rohan
  • 2,681
  • 1
  • 12
  • 18