From 3b15223b1daa076d851b9d05f87c78611ff2a2e1 Mon Sep 17 00:00:00 2001 From: Bradley Shellnut Date: Wed, 3 Mar 2021 20:11:37 -0800 Subject: [PATCH] Calling post of form data. --- src/index.js | 4 ++++ src/public/index.html | 32 ++++++++++++++++++++++++++++++++ 2 files changed, 36 insertions(+) diff --git a/src/index.js b/src/index.js index 90c6761..32904fd 100644 --- a/src/index.js +++ b/src/index.js @@ -17,6 +17,10 @@ async function startApp() { root: path.join(__dirname, "public"), }) + app.post('/api/register', {}, (request, reply) => { + console.log('request', request.body.email, request.body.password); + }) + // app.get("/", {}, (request, reply) => { // reply.send({ // data: "hello world", diff --git a/src/public/index.html b/src/public/index.html index 74e4c62..cb28d32 100644 --- a/src/public/index.html +++ b/src/public/index.html @@ -8,5 +8,37 @@

Hello

+

Register Form

+
+ + + +
+ + \ No newline at end of file