How can I directly access server-side app when running app in two process mode with CLI 3.0

sagar_at_avyya
Shopify Partner
31 1 16

The whole process management inside CLI 3.0 is a complete mystery to me. 

When I run `npm run dev` it creates two processes, one for the frontend (which will serve our react app) and another backend (which runs puma for our rails app). Fair enough! 

 

Now there are certain things (like the ActiveAdmin dashboard or Sidekiq dashboard) I would want to access directly on the server app. I can do that using 

 

127.0.0.1:<<puma_port>>/sidekiq  

Can I access this on the ngrok's URL? If yes, how?

 

In a nutshell, in a two-process setup using CLI 3.0, how can one hit a server-side process directly from the URL?

Can I convert this setup into one process setup? Any template for that?

 

I'm not sure if this is causing issues with webhooks too, as my webhooks are being caught by HomeController for an app that's created using the template of ruby (with shopify_app gem), which shows a CSRF error! 

 

Thank you very much.

 


Sagar @ Avyya - Modern Sales Booster
 - Was my reply helpful? Click Like to let me know! 
 - Was your question answered? Mark it as an Accepted Solution

Reply 1 (1)

ShopifyDevSup
Shopify Staff
1363 228 476

Hey @sagar_at_avyya - I would reach out directly in the CLI's Github repo here at this link, if you haven't already, and open a GH issue. This will get you in touch with other folks who are troubleshooting potential issues with the CLI as well as our product team who are responsible for development/maintenance of the CLI. 

These are great questions though - I get where you're coming from in terms of splitting the processes up, it would make it easier from a debugging and development perspective. My understanding is that the intention of the separate services is to help make apps scalable and more performant out of the box. I can't speak to specific reasons behind why we've built our CLI a specific way, but you should be able to get more insight and help from the folks involved with the repo who may have built templates or have workarounds. 

 

Hope this helps, I noticed it's been a few days since you opened this thread and there had been no reply, so I wanted to provide some next steps to help get this answered for you.

 

Al | Shopify Developer Support

Developer Support @ Shopify
- Was this reply helpful? Click Like to let us know!
- Was your question answered? Mark it as an Accepted Solution
- To learn more visit Shopify.dev or the Shopify Web Design and Development Blog