What no server?
That’s right – you can serve up data from your Google Apps Script directly. In my post the other day, I showed how to use the Google Apps ScriptDB as a place to store the Rest-Excel library. Now ideally, you’d want to get that out again by making a simple API call – but we dont have a server. With the new Google Apps Script ContentService, you dont need one.
Here’s all there is to it.
Create a doGet() module that looks like this. function doGet(e) { return ContentService .createTextOutput(mcpher.getRestLibrary().serialize()) .setMimeType(ContentService.MimeType.JSON); }
Publish your app as a web app. – try the link below..
https://script.google.com/a/macros/mcpher.com/s/AKfycbzLqpnQ2ey8CKAMmzchb2n2FU-aiae0iTKPzAOfAgEpxGwaJgk/execYou get the contents of the scriptDB query. This is seriously useful. Next post I’ll show you how to pass parameters to query and potentially update the scriptDB.
https://script.google.com/a/macros/mcpher.com/s/AKfycbzLqpnQ2ey8CKAMmzchb2n2FU-aiae0iTKPzAOfAgEpxGwaJgk/execYou get the contents of the scriptDB query. This is seriously useful. Next post I’ll show you how to pass parameters to query and potentially update the scriptDB.