Development discussions around Shopify APIs
I'm new to app dev for Shopify. I have followed the shopify tutorial for creating an app with Node.js and React. It works as expected. But I'm puzzled on how to deploy this app so that it is reachable through the url rather than through ngrok. (ngrok is very rate limited!)
You can install it here: https://6a69b1a8.ngrok.io/auth?shop=YOURSHOP.myshopify.com
This is the server url: https://ec2-13-59-236-171.us-east-2.compute.amazonaws.com
Code is identical to: https://github.com/Shopify/shopify-demo-app-node-react/tree/master
Thanks!
Hi there @FurnaceX
Great to hear the Build an App with Node.js and React tutorial worked out well for you 🙂 While we don't have specific instructions for deploying your app to AWS, there are steps outlined in this GitHub issue that look at how to deploy to Heroku. However, the general process should be similar in theory with a different server.
Hope this helps- let us know if you run into issues.
Cheers,
Liam Griffin
Shopify | Developer Advocate
Liam | Developer Community Manager @ Shopify
- Was my reply helpful? Click Like to let me 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
Hi Liam, I think my issue is a bit different.
I am now trying to eliminate the ngrok tunnel. (or am I required to use this??)
Do I keep the node.js server listening on port 3000? Or do I need to modify that?
In the app setup, do I need to list the app url as: http://ec2-13-59-xxx-xxx.us-east-2.compute.amazonaws.com:3000/ (i.e. with the port 300 included)?
In the whitelisted redirection URLs, do I need to also have the port, like so: http://ec2-13-59-xxx-xxx.us-east-2.compute.amazonaws.com:3000/auth/callback
In the Heroku example you referred me to, no mention is made about the port. The example shows no port for the callback.
When I install the app, the callback gets sent to https (port 443) and the node.js server doesn't respond since it's listening only on port 3000.
very confused how to make this work without ngrok!
Thanks!
When I install the app, the callback gets sent to https (port 443) and the node.js server doesn't respond since it's listening only on port 3000.
I should add that to get to the first step of having the app initiate the auth, I called https://ec2-13-59-xxx-xxx.us-east-2.compute.amazonaws.com:3000/auth?shop=MYSHOP.myshopify.com (i.e. WITH port 3000). That at least got it to start the process, but the callback goes to https://ec2.... which is never heard because the node server is listening on port 3000.
If I try to install the app through https://ec2-13-59-xxx-xxx.us-east-2.compute.amazonaws.com/auth?shop=MYSHOP.myshopify.com (i.e. WITHOUT port listed), the node server never responds.
@FurnaceX Did you have any luck with this? I am soon to get mine deployed to AWS and any pointers would be really helpful! Thanks in advance.
Hey @aaronnc,
Let me know if you have specific questions.
But to answer my own question from above, the key was setting up a reverse proxy in my Apache server config to redirect the requests to the running Node server listing on port 3000:
ProxyPass / http://127.0.0.1:3000/
ProxyPassReverse / http://127.0.0.1:3000/
ProxyPreserveHost On
NGINX might be a better option over Apache.
Good Luck!
Connect your PayPal account to allow your customers to checkout using the PayPal gateway a...
ByYour online store speed can enhance your store’s discoverability, boost conversion rates a...
ByShopping is at our fingertips with mobile devices. Is your theme optimized to be user-frie...
By