From 9c0bad1f8c8305e9ff93632a0bcbb68e1f4e7169 Mon Sep 17 00:00:00 2001 From: Begin Date: Wed, 5 Feb 2020 15:40:01 -0500 Subject: [PATCH] _ci: adds src/http/get-index/index.js --- src/http/get-index/index.js | 39 +++++++++++++++++++++++++++++++++++++ 1 file changed, 39 insertions(+) create mode 100644 src/http/get-index/index.js diff --git a/src/http/get-index/index.js b/src/http/get-index/index.js new file mode 100644 index 00000000..f814a3de --- /dev/null +++ b/src/http/get-index/index.js @@ -0,0 +1,39 @@ +// Enable secure sessions, express-style middleware, and more: +// https://docs.begin.com/en/functions/http/ +// +// let begin = require('@architect/functions') + +let html = ` + + + + + Hi! + + + + +

+ Hello world! +

+

+ Your new route is ready to go! +

+

+ Learn more about building Begin HTTP functions here. +

+ + +` + +// HTTP function +exports.handler = async function http(req) { + console.log(req) + return { + headers: { + 'content-type': 'text/html; charset=utf8', + 'cache-control': 'no-cache, no-store, must-revalidate, max-age=0, s-maxage=0' + }, + body: html + } +}