Skip to content

Instantly share code, notes, and snippets.

@MarcL
Created June 2, 2020 19:48
Show Gist options
  • Select an option

  • Save MarcL/c2d206ea376d02d0c2f741a5771ad296 to your computer and use it in GitHub Desktop.

Select an option

Save MarcL/c2d206ea376d02d0c2f741a5771ad296 to your computer and use it in GitHub Desktop.

Revisions

  1. MarcL created this gist Jun 2, 2020.
    8 changes: 8 additions & 0 deletions serverlessHtmlRender.js
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,8 @@
    const { readFileSync } = require('fs');
    const { join } = require('path');

    const html = readFileSync(join(__dirname, './index.html'), 'utf8');

    module.exports = (request, response) => {
    response.send(html);
    };