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 = ` + + +
+ ++ 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 + } +}