Last active
March 31, 2020 23:33
-
-
Save koptionalsoftware/b83bcb525e542fb8aeada21fa73ae40c to your computer and use it in GitHub Desktop.
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
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