Skip to content

Instantly share code, notes, and snippets.

@kylebuildsstuff
Created February 13, 2020 22:04
Show Gist options
  • Save kylebuildsstuff/21d20ed67e1d07d85de86954519d5ef0 to your computer and use it in GitHub Desktop.
Save kylebuildsstuff/21d20ed67e1d07d85de86954519d5ef0 to your computer and use it in GitHub Desktop.

Revisions

  1. kylebuildsstuff created this gist Feb 13, 2020.
    15 changes: 15 additions & 0 deletions script-tag-ex
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,15 @@
    // app.middleware.js

    const buildScriptTagSrcUrl = (): string => {
    return process.env.SCRIPT_TAG_URL || '';
    };

    export const initializeApp = async (ctx) => {
    ...
    await createScriptTag(
    buildScriptTagSrcUrl(),
    SCRIPT_TAG_DISPLAY_SCOPE.ONLINE_STORE,
    shop,
    )
    ...
    }