Clone and edit this document
Runkit
Runkit
home page
user forum
new notebook
clone notebook
download notebook
support & documentation
log in
sign up
new notebook
help & feedback
clone this notebook
download this notebook
Sign In
Sign Up
untitled notebook
node v8.17.0
version:
2.0.0
endpoint
share
tweet
const docx = require('docx'); var express = require("@runkit/runkit/express-endpoint/1.0.0"); var app = express(exports); app.get("/", (req, res) => { var doc = new docx.Document(); var paragraph = new docx.Paragraph("Hello World"); doc.addParagraph(paragraph); const expressPacker = new docx.ExpressPacker(doc, res); expressPacker.packPdf("Document"); response.end("Hello world!"); })
Created from: https://runkit.com/docs/endpoint
Loading…
no comments
sign in
to comment