Solved

"shopify node serve" running on a port other then 8081

Eli_A
Tourist
4 1 2

 Hello, 

I'm having a problem with using the command "shopify node serve". I followed the quick start guided: https://shopify.dev/apps/getting-started/create

Unfortunately, my McAfee Antivirus uses port 8081 and will not let me use that port. 

I tried changing the port in the server.js file but the ngrok tunnel that is created when executing "shopify node serve" command always uses to use port 8081 for the ngrok tunnel. I also tried setting the port via the .env with no luck.

Is there a way to set the port number to another number when using "shopify node serve" command? 

 

Thank you for your time

Accepted Solution (1)
Eli_A
Tourist
4 1 2

This is an accepted solution.

Just in case you want to change the port number its in shopify-cli file in the tunnel.rb file (C:\Ruby30-x64\lib\ruby\gems\3.0.0\gems\shopify-cli-2.1.0\lib\shopify-cli\tunnel.rb). Close to the top is a variable for port change that one to change the port.

View solution in original post

Replies 3 (3)

Eli_A
Tourist
4 1 2

I found out how to change the port number. 

We can close this one.

Eli_A
Tourist
4 1 2

This is an accepted solution.

Just in case you want to change the port number its in shopify-cli file in the tunnel.rb file (C:\Ruby30-x64\lib\ruby\gems\3.0.0\gems\shopify-cli-2.1.0\lib\shopify-cli\tunnel.rb). Close to the top is a variable for port change that one to change the port.

crunchy-bytes
Shopify Partner
1 0 0

You just need to add --port parameter to your command

 

shopify app serve --port 3000

 

Hope to help.

Davide