How to setup and use Shopify App Proxy

  Рет қаралды 6,852

Harshdeep "Kinngh" Hura - Shopify Dev

Жыл бұрын

The `How To Build Shopify Apps` course is now available! Get it on Gumroad 👉 kinngh.gumroad.com/l/how-to-make-shopify-apps 👈
We go over how to setup app proxy in your Shopify app using my open source boilerplate repository, and not just run a few commands and be up and running, but explaining things step by step on how and why things work, breaking things on purpose and understanding why they break and how to fix it.
Links mentioned in the video:
- Boilerplate GitHub Repo: github.com/kinngh/shopify-node-express-mongodb-app
- Shopify app proxy documentation: shopify.dev/apps/online-store/app-proxies
- ShopifyDev's video on app proxy: kzbin.info/www/bejne/kJrYmKd-ecinfM0
Twitter: kinngh
Substack: kinngh.substack.com
Web: harshdeephura.com
Heura Media: heuramedia.com
Markers:
0:00 - Introduction
0:11 - How to setup app proxy
4:40 - Changing app proxy URL from the storefront
6:26 - How to make GraphQL calls from app proxy routes
9:30 - How to server HTML from app proxy routes
11:12 - Getting creative with app proxy
17:22 - Outro

Пікірлер: 38
@KinnghHeura
@KinnghHeura Жыл бұрын
"How to build Shopify apps" course is now available! Get the preorder discount using the code `PREORDER` at checkout for $100 off! kinngh.gumroad.com/l/how-to-make-shopify-apps?offer_code=PREORDER
@manuelpineda924
@manuelpineda924 4 ай бұрын
Thank you so much!!!! I was struggling getting the proxy to work, and it was because on the merchant side it had a different proxy than the app configuration. I spend like an entire day trouble shooting and it was that simple.
@KinnghHeura
@KinnghHeura 4 ай бұрын
Haha we’ve all been there!
@purplepigfarm5391
@purplepigfarm5391 Жыл бұрын
Thank you sir! You saved my sanity. Your content is amazing, I see a new rising star in the KZbin developer space!
@RamsheedKC
@RamsheedKC Жыл бұрын
I was struggling with app proxy. got it working. thanks. keep up the good work
@ShajeyRumi
@ShajeyRumi Жыл бұрын
Thanks a lot. this was exactly what i needed today.
@wakilahmed2704
@wakilahmed2704 6 ай бұрын
Hello! Thanks for providing us with amazing tutorials. Can you please help me with the following issue? From my default products page in the storefront when a customer clicks a product I wanna check that product's metafields and then based on the conditions I wanna render that product in a totally customized product page. How can I do that? Thanks!
@KinnghHeura
@KinnghHeura 6 ай бұрын
RTFD
@wakilahmed2704
@wakilahmed2704 6 ай бұрын
@@KinnghHeura Sorry, I didn't understand man! What did you mean? Read the full doc? Rich Text Format Directory?
@nitinjangra1892
@nitinjangra1892 Жыл бұрын
I am having trouble setting up proxy on the official shopify cli boilerplate node template. I did all the things you mentioned in this video but still not working
@KinnghHeura
@KinnghHeura Жыл бұрын
You'll need to add the verify proxy middleware and pass it like I have in my repo.
@becky5124
@becky5124 Жыл бұрын
Hey Hardeep, great video thank you :) this is super helpful! I want to create a Shopify app to utilise it as a proxy to make calls from the liquid code so that it can handle Shopify API requests securely for me. I've been trying to spin up a really simple app to just focus on the proxy routes, but I've come across many issues with auth. I've just started to look into your boilerplate (which is awesome btw!) and I was looking to strip it back for my use case (i.e. focus on the proxy routes so I can use Shopify API to add meta data to customers on certain actions) and I was wondering if I would still need a DB in this case? I assume the DB is to persist the session and store data? (sorry complete newbie here to Shopify app dev!)
@KinnghHeura
@KinnghHeura Жыл бұрын
So first I'd recommend learning your stack, and then hoping on dev. Yes, we need to auth so the proxy works, so we need the database^
@becky5124
@becky5124 Жыл бұрын
@@KinnghHeura great thank you. Node JS is the stack I typically work with, but I am relatively new to it still.
@nehagawali461
@nehagawali461 Жыл бұрын
Thanks a lot for video...I search a lot .. finally I get what I want🙏🙏🙏
@LukeMilsom
@LukeMilsom Жыл бұрын
Amazing! Great video.
@nopockyforkitteh
@nopockyforkitteh Жыл бұрын
Hey thanks for the video. Does this work on a development store? I tried setting up an app proxy and everything works great in the browser. However, if I attempt to hit the app proxy URL from Postman or Javascript, the response always redirects to the password page. Maybe i'm missing something?
@KinnghHeura
@KinnghHeura Жыл бұрын
Postman / external calls won't go through since we have middle wares to ensure the request only come from shopify. You can hard code a bypass in your verifyProxy middleware to allow for external calls on a specific store when in dev mode
@nopockyforkitteh
@nopockyforkitteh Жыл бұрын
@@KinnghHeura that makes sense. We got it working. Thanks so much for the reply!
@VipashaKatna
@VipashaKatna Жыл бұрын
Thanks for video. Is this possible to have proxy app to embed on home page? Or can I customize it to add some JS? It is created by some other developers to add a builder from external store. Now I have to change the logo to ours and add some JS to have additional functionality. I am new to Shopify. I have to link that shopify builder to Magento cart.
@KinnghHeura
@KinnghHeura Жыл бұрын
Your theme extension can be embedded anywhere in the store and add in HTML/CSS/JS/Liquid
@VipashaKatna
@VipashaKatna Жыл бұрын
@@KinnghHeura Any videos for embedding it in theme or customizing app?
@KinnghHeura
@KinnghHeura Жыл бұрын
@user-vz4ns1dp2c I've moved all of that over to courseware, but you can read the docs and get it done easily!
@amandapratescaetano4876
@amandapratescaetano4876 Жыл бұрын
Hello! Amazing video! I have a question about using app proxies with theme app extensions. I created an app and I need to list on the store online (theme) the product that I set up on the app interface. Is it possible to use app proxies in this context? The idea is to let the user pick a product on the app UI and list it on the theme. Thank you!
@KinnghHeura
@KinnghHeura Жыл бұрын
I'm not sure I understand
@tejasvyas8862
@tejasvyas8862 Жыл бұрын
It was useful but I have use case, for example, I want to modify the collection pages to change the order of the products using proxy, how this could be possible?
@KinnghHeura
@KinnghHeura Жыл бұрын
Make a GraphQL call from your proxy to update the order or to your database, whatever the context of collection order is.
@ayushmukhopadhyay7470
@ayushmukhopadhyay7470 Жыл бұрын
Hey how do we render a js file using shopify app proxy any Idea ?
@KinnghHeura
@KinnghHeura Жыл бұрын
You do not render using a Shopify proxy. You only send requests via a proxy and do UI via a theme extension
@ayushmukhopadhyay7470
@ayushmukhopadhyay7470 Жыл бұрын
But we can render right the liquid file .... What if I convert the js into cdn and pass the cdn as a script in liquid and render that liquid ?
@KinnghHeura
@KinnghHeura Жыл бұрын
I won't recommend that, you're probably over engineering.
@NolanWagner-s9c
@NolanWagner-s9c Жыл бұрын
I can't authenticate the app with the store without running into a MongoDB error, this is after commenting out the connection line in index.js. So the DB is required? The setup says I can leave it blank.
@KinnghHeura
@KinnghHeura Жыл бұрын
If you're running mongodb on default settings you can leave it blank in env. The setup never asks you go leave it blank on index.js
@ewe-666
@ewe-666 21 күн бұрын
proxy be workin lol
@KinnghHeura
@KinnghHeura 21 күн бұрын
Well it do be workin' ™ 🤣 No but for real a lot of people get stuck on Proxy, so I wrote that in just to have a chuckle for when you finally figure out (for the first time) that it's working!
@ewe-666
@ewe-666 21 күн бұрын
also that use case with the download links is pretty genius! props to you for that
@清水太一-x1q
@清水太一-x1q Жыл бұрын
この動画は最高です!ありがとう!日本の26歳男より
@KinnghHeura
@KinnghHeura Жыл бұрын
温かいお言葉をありがとうございました! (Google翻訳を使用して完了)
Cool Parenting Gadget Against Mosquitos! 🦟👶
00:21
TheSoul Music Family
Рет қаралды 12 МЛН
ДЕНЬ УЧИТЕЛЯ В ШКОЛЕ
01:00
SIDELNIKOVVV
Рет қаралды 4 МЛН
小天使和小丑太会演了!#小丑#天使#家庭#搞笑
00:25
家庭搞笑日记
Рет қаралды 57 МЛН
Это было очень близко...
00:10
Аришнев
Рет қаралды 1,6 МЛН
Cool Parenting Gadget Against Mosquitos! 🦟👶
00:21
TheSoul Music Family
Рет қаралды 12 МЛН