Skip to content

Instantly share code, notes, and snippets.

@emilong
Last active March 28, 2016 21:27
Show Gist options
  • Save emilong/c1813c3f6efb55b7dc70 to your computer and use it in GitHub Desktop.
Save emilong/c1813c3f6efb55b7dc70 to your computer and use it in GitHub Desktop.
const Content = require(“../models/content”);
const PdfApi = require('some-pdf-service-api-client');
PdfApi.configure(process.env.PDF_API_KEY);
modules.export = {
generate: function(contentId) {
const content = Content.find(contentId);
return PdfApi.render(content.format());
}
};
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment