This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
export const loadGoogleScript = () => { | |
//loads the Google JavaScript Library | |
(function () { | |
const id = 'google-js'; | |
const src = 'https://apis.google.com/js/platform.js'; | |
//we have at least one script (React) | |
const firstJs = document.getElementsByTagName('script')[0]; | |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
cd /home/ubuntu/code | |
git clone [email protected]:klaudsol/shopify-app-under-20-minutes.git app1 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
chmod +x /home/ubuntu/code/app1/entrypoint.sh |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
docker-compose up -d | |
docker-compose logs -f |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Hello from Docker! | |
This message shows that your installation appears to be working correctly. | |
To generate this message, Docker took the following steps: | |
1. The Docker client contacted the Docker daemon. | |
2. The Docker daemon pulled the "hello-world" image from the Docker Hub. | |
(amd64) | |
3. The Docker daemon created a new container from that image which runs the | |
executable that produces the output you are currently reading. | |
4. The Docker daemon streamed that output to the Docker client, which sent it |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
docker run hello-world | |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
npm run-script build | |
npm start |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
export function ONETIME_CREATE(url) { | |
return gql` | |
mutation { | |
appPurchaseOneTimeCreate( | |
name: "test" | |
price: { amount: 10, currencyCode: USD } | |
returnUrl: '${url}' | |
test: true | |
) { | |
userErrors { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
export function RECURRING_CREATE(url) { | |
return gql` | |
mutation { | |
appSubscriptionCreate( | |
name: "Super Duper Plan" | |
returnUrl: "${url}" | |
test: true, | |
trialDays: 7, | |
lineItems: [ | |
{ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
server.use( | |
createShopifyAuth({ | |
apiKey: SHOPIFY_API_KEY, | |
secret: SHOPIFY_API_SECRET, | |
scopes: [SCOPES], | |
async afterAuth(ctx) { | |
//Auth token and shop available in session | |
//Redirect to shop upon auth | |
const { shop, accessToken } = ctx.session; |
NewerOlder