Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
const drawSignatures = require("./drawSignatures");
const express = require("express");
const bodyParser = require("body-parser");
const app = express();
app.use(bodyParser.json());
app.use(bodyParser.urlencoded({ extended: false }));
app.post("/", async (request, response) => {
try {
const bytes = await drawSignatures.drawSignatures(request.body.doc, request.body.signature);
return response.send(bytes);
}
catch (err) {
return response.status(500).send({ message: err.message });
}
});
module.exports = app;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.