How to set localhost port in remix app

Solved
anhdd-kuro-159
Shopify Partner
14 0 5

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)
refactor_this
Shopify Partner
8 1 0

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

View solution in original post

Replies 5 (5)
refactor_this
Shopify Partner
8 1 0

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

anhdd-kuro-159
Shopify Partner
14 0 5

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

refactor_this
Shopify Partner
8 1 0

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

refactor_this
Shopify Partner
8 1 0

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.

Danh11
Shopify Partner
62 2 20

-- nevermind. i posted before I read --