340 votes
0 answers
localhost - How to run your Shopify app without Ngrok?
Solution:
You can use Cloudflare Tunnel (http://cloudflare.com/products/tunnel/) in one of my apps. I use Laravel, I configured all the required commands to run viapackage.json
file, so I just need to run yarn dev and it will run:
source .env
php artisan serve --host=localhost --port=8000
cloudflared tunnel run your_tunnel_name_here
NODE_ENV=development yarn watch
You will have to make sure you configure Cloudflare to not have the cache to the URL you decided to use. Then you will have your app running via a free tunnel as before.
This is how mypackage.json
looks like:
{
"name": "my_app_name_here",
"private": true,
"scripts": {
"dev": "sh -c 'source .env; php artisan serve --host=localhost --port=8000 & cloudflared tunnel your_tunnel_name_here & NODE_ENV=development yarn watch'",
"production": "mix --production",
"build": "NODE_ENV=production yarn production"
},...
Undefined asked
Source
Didn't find the answer?
Our community is visited by hundreds of Shopify development professionals every day. Ask your question and get a quick answer for free.
Similar questions
Find the answer in similar questions on our website.
Write quick answer
Do you know the answer to this question? Write a quick response to it. With your help, we will make our community stronger.