-2

My company has a rails 5.2.4 application, after starting the development server by

rails s

The server is running on localhost:3000. But a company is using app.test.com:3000 domain in order to access the application...

7urkm3n
  • 6,054
  • 4
  • 29
  • 46
Ankit
  • 91
  • 2
  • 7
  • What you see if you access app.test.com:3000 ? I kinda do not get, where is the problem. Or can you access only localhost:3000? Do you use dnsmasq ? We need more info i am affraid ... – mArtinko5MB Sep 03 '20 at 07:56
  • Port 3000 is not the normal port for HTTP (80) or HTTPS (443) and you need to setup your webserver to actually allow access over that port or run rails on one of those ports. – max Sep 03 '20 at 08:02
  • You can also use a tunnel like NGrok. – max Sep 03 '20 at 08:02
  • @max thanks its working now after following "7urkm3n" answer helped me in getting the work done. – Ankit Sep 04 '20 at 04:27
  • @mArtinko5MB thanks its working now after following "7urkm3n" answer helped me in getting the work done. – Ankit Sep 04 '20 at 04:27

1 Answers1

1

You can just use: lvh.me, more about subdomain

Run rails s -p 3000 -b lvh.me

Visit app.lvh.me:3000

7urkm3n
  • 6,054
  • 4
  • 29
  • 46
  • thanks this worked, i followed the article you have given and it solved the problem. I just need to add the domain in /etc/hosts file and it started working with app.test.com:3000. – Ankit Sep 04 '20 at 04:21