Share your local Rails Application via ngrok Link.

Share your local Rails Application via ngrok Link.

20 Sep 2022
0 Comments
Share your local Rails Application via ngrok Link.

Prerequisites:

Let’s get started with the setting up ngrok in your rails application
 

1. Start the ngrok server on your desired port number with this command.

Note: you should run this command in the terminal where you have unzipped the ngrok installation file.

If your terminal looks like something above the image, you have started ngrok server on your given port no.

2. Copy the “240f-59–95–101–113.ngrok.io” from the ngrok server you’ve started(have a look at the white rectangle above).
 

3. Goto application.rb file of the rails application you want to use ngrok for.
 

4. Add the following line in your application. rb file.

THE LINE: config.hosts << “2a1e-59–95–101–113.ngrok.io”

Note: You will have something different number on “2a1e-59–95–101–113.ngrok.io” mine.


5. Start your application on your local server.


6. Now search in the browser with the link.




Leave a comment: