GithubHelp home page GithubHelp logo

dasmodal / shopify-hotwire-sample Goto Github PK

View Code? Open in Web Editor NEW

This project forked from kirillplatonov/shopify-hotwire-sample

0.0 0.0 0.0 1.35 MB

A sample app for Shopify's JWT integration with Hotwire Turbo

Shell 0.45% JavaScript 14.40% Ruby 64.01% CSS 0.06% HTML 21.08%

shopify-hotwire-sample's Introduction

Shopify Hotwire Sample

The sample app includes:

Shopify Hotwire Sample

If you're using this sample app, please consider becoming a sponsor. It will help with the development of this project.

Previous versions

Dependencies

  • Redis
  • Postgres

OAuth Tunnel in Development

In order to redirect OAuth requests securely to localhost, you'll need to setup a tunnel to redirect from the internet to localhost.

To do that, you can install the cloudflared CLI tool, and run:

# Note that you can also use a different port
cloudflared tunnel --url http://localhost:3000

You will need to keep this window running to maintain the tunnel during development.

For more advanced tunnel setup check out article Setting up Cloudflare Tunnel for development.

Quick start

To run this sample locally, you can clone this repository and do the following.

  1. Create a new app in your Shopify Partner account unless you already have one.

  2. Connect to Shopify:

shopify app connect

It will generate .env file with Shopify API credentials.

  1. Add HOST with your cloudflare tunnel to .env file:
HOST=https://<Your tunnel host>
  1. Update your app URLs in the Shopify Partner dashboard to point to your tunnel.

Set the App URL to https://<your tunnel host>/ and the Allowed redirection URL(s) to https://<your tunnel host>/auth/shopify/callback.

  1. Setup Rails app:
bin/setup
  1. Start the app:
bin/dev
  1. Install and open this app on a development shop.

Heroku Setup

To run your app in Heroku you need add the Shopify API Key, Shopify API Secret and Host to your config vars. You find the API Key and API Secret in your app setup. The host is your heroku app domain.

This templates config vars are: SHOPIFY_API_KEY, SHOPIFY_API_SECRET, HOST

shopify-hotwire-sample's People

Contributors

kirillplatonov avatar dan-gamble avatar forsbergplustwo avatar drnic avatar remy727 avatar almeidaz avatar kurbm avatar gathuku avatar uurcank avatar vasaf avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.