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 fastifyImp = require("fastify"); | |
const fastify = fastifyImp({ | |
logger: true | |
}); | |
fastify.post("/", async (request, reply) => { | |
// Some sort of request validation | |
const bytes = await drawSignatures.drawSignatures(request.body.doc, request.body.signature); | |
reply.send(bytes); | |
}); |
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); |
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
{"lastUpload":"2022-01-21T14:42:16.736Z","extensionVersion":"v3.4.3"} |
OlderNewer