Skip to content

Instantly share code, notes, and snippets.

@techstreams
Created February 2, 2016 04:25
Show Gist options
  • Save techstreams/ed07d47d83cb5649ed59 to your computer and use it in GitHub Desktop.
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
/**
* 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