Navigation Menu

Skip to content

Instantly share code, notes, and snippets.

@KTruong008
Created February 13, 2020 22:04
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save KTruong008/21d20ed67e1d07d85de86954519d5ef0 to your computer and use it in GitHub Desktop.
Save KTruong008/21d20ed67e1d07d85de86954519d5ef0 to your computer and use it in GitHub Desktop.
// 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,
)
...
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment