-
-
Save techstreams/ed07d47d83cb5649ed59 to your computer and use it in GitHub Desktop.
Simple Google Apps Script Markdown Server for iOS Workflow App. See blog post - http://goo.gl/DOMJUF
This file contains 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
/** | |
* Copyright (c), Laura Taylor. (MIT Licensed) | |
* https://techstreams.github.io | |
*/ | |
/** | |
* Simple Google Apps Script Content Server | |
* @param {string} e - Event object | |
* @returns {string} | |
*/ | |
function doGet(e) { | |
var content; | |
if (e.parameter.name) { | |
// Get content of selected markdown file | |
content = HtmlService | |
.createHtmlOutputFromFile(e.parameter.name.trim()) | |
.getContent(); | |
} else { | |
// Return a comma separated list of file names | |
content = "Example1," + | |
"Example2"; | |
} | |
return ContentService.createTextOutput(content); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment