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
| /* client side */ | |
| if (typeof shopify !== "undefined") { | |
| //get the current session token from shopify | |
| const sessionToken = await shopify.idToken(); | |
| // send the session token to your server to exchange it for an online token with the user info | |
| const response = await fetch(GET_USER_INFO_FROM_SESSION_URL, { | |
| method: "POST", | |
| headers: { | |
| "Content-Type": "application/json", | |
| // TODO: add your server api auth headers here |
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
| let repl = require('repl'); | |
| let models = require('./db/models'); | |
| Object.keys(models).forEach((modelName) => { | |
| global[modelName] = models[modelName]; | |
| }); | |
| let replServer = repl.start({ | |
| prompt: 'app > ', | |
| }); |
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
| window.alert = function(message, title) { | |
| if($("#bootstrap-alert-box-modal").length == 0) { | |
| $("body").append('<div id="bootstrap-alert-box-modal" class="modal fade">\ | |
| <div class="modal-dialog">\ | |
| <div class="modal-content">\ | |
| <div class="modal-header" style="min-height:40px;">\ | |
| <button type="button" class="close" data-dismiss="modal" aria-hidden="true">×</button>\ | |
| <h4 class="modal-title"></h4>\ | |
| </div>\ | |
| <div class="modal-body"><p></p></div>\ |
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
| window.alert = function(message, title) { | |
| if($("#bootstrap-alert-box-modal").length == 0) { | |
| $("body").append('<div id="bootstrap-alert-box-modal" class="modal hide fade">\ | |
| <div class="modal-header" style="min-height:20px;">\ | |
| <button type="button" class="close" data-dismiss="modal" aria-hidden="true">×</button>\ | |
| <h3></h3>\ | |
| </div>\ | |
| <div class="modal-body"><p></p></div>\ | |
| <div class="modal-footer">\ | |
| <a href="#" data-dismiss="modal" class="btn">Close</a>\ |