Created
June 2, 2020 19:48
-
-
Save MarcL/c2d206ea376d02d0c2f741a5771ad296 to your computer and use it in GitHub Desktop.
Renders an HTML file using a serverless function (Vercel in my case)
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 { readFileSync } = require('fs'); | |
const { join } = require('path'); | |
const html = readFileSync(join(__dirname, './index.html'), 'utf8'); | |
module.exports = (request, response) => { | |
response.send(html); | |
}; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment