justinsisley / mercenary

The force multiplier web app stack
3 stars 2 forks source link

Make pre-rendering work better #77

Closed justinsisley closed 7 years ago

justinsisley commented 7 years ago

Can steal ideas from https://github.com/egoist/presite

justinsisley commented 7 years ago

https://github.com/egoist/taki

justinsisley commented 7 years ago

https://github.com/OnetapInc/chromy

justinsisley commented 7 years ago
const Chromy = require('chromy')

async function buildStatic() {
  let chromy = new Chromy()

  await chromy.goto('http://localhost:3325/')

  const result = await chromy.evaluate(() => {
    return document.querySelector('html').innerHTML;
  });

  console.log(result)

  await chromy.close()
};

module.exports = buildStatic;