Re: How to set localhost port in remix app

Solved

How can I specify localhost port in a Remix app?

anhdd-kuro-159
Shopify Partner
14 0 7

In Remix, we can easily specify the port for localhost using the --port option.

However, for an app that was created using the CLI and has a development script named "shopify app dev"

How can I set the port in this case?

Accepted Solution (1)

Jon_Innovonics
Shopify Partner
24 3 9

This is an accepted solution.

Hey there, I was able to find a solution and made a post about it here: https://thingify.dev/how-to-change-the-localhost-port-for-the-new-shopify-remix-app-template/

This should work for you as well, if not please let me know

️ If I was helpful, please Like or Accept the solution


Contact me directly via email: Jonathan@Innovonics.com


 

View solution in original post

Replies 5 (5)

Jon_Innovonics
Shopify Partner
24 3 9

This is an accepted solution.

Hey there, I was able to find a solution and made a post about it here: https://thingify.dev/how-to-change-the-localhost-port-for-the-new-shopify-remix-app-template/

This should work for you as well, if not please let me know

️ If I was helpful, please Like or Accept the solution


Contact me directly via email: Jonathan@Innovonics.com


 

anhdd-kuro-159
Shopify Partner
14 0 7

Thank you for your response! It worked!

May I pose another question?

I continue to encounter this error, and Hot Module Reload (HMR) is not functioning.

Are you familiar with the potential reasons behind this issue? 

スクリーンショット 2023-08-20 11.45.19.png

Jon_Innovonics
Shopify Partner
24 3 9

This probably has to do with that socket.tsx route I created, I wasn't exactly sure of the use for it, I just knew the remix server was making requests to it and to respond to it. Weird though because I don't encounter that error at all

️ If I was helpful, please Like or Accept the solution


Contact me directly via email: Jonathan@Innovonics.com


 

Jon_Innovonics
Shopify Partner
24 3 9

Actually I was able to figure this out and just updated my blog post about it, check it out. You can get rid of the errors, unfortunately I still don't see live reload happening but if I get that to work I will update here.

️ If I was helpful, please Like or Accept the solution


Contact me directly via email: Jonathan@Innovonics.com


 

Danh11
Shopify Partner
87 2 40

-- nevermind. i posted before I read --