Created
February 2, 2018 22:38
-
-
Save brianleroux/69eef7d0f6892925e2f18b7710d9d7e1 to your computer and use it in GitHub Desktop.
Passing req._url into a template.
This file contains hidden or 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 arc = require('@architect/functions') | |
const layout = require('@architect/shared/views/bootstrap') | |
function route(req, res) { | |
let html = layout({ | |
_url: req._url, | |
title: 'My App', | |
body: ` | |
<div class=jumbotron> | |
<h1 class=display-4>Add to Slack</h1> | |
<p class=lead>Install this app to start using it in Slack.</p> | |
<hr class=my-4> | |
<p>${msg}</p> | |
<p class="lead">TODO REAL BUTTON HEREEEE</p> | |
</div>`, | |
}) | |
res({html}) | |
} | |
exports.handler = arc.html.get(route) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment