chore(examples): update routify version to 2.x

This commit is contained in:
La Ode Muhammad Al Fatih 2021-02-03 23:17:51 +07:00
commit 1fdd2338f9
32 changed files with 2849 additions and 2693 deletions

View file

@ -0,0 +1,11 @@
const fs = require('fs')
const { tossr } = require('tossr')
const script = fs.readFileSync(require.resolve('../../dist/build/bundle.js'), 'utf8')
const template = fs.readFileSync(require.resolve('../../dist/__app.html'), 'utf8')
module.exports = async (req, res) => {
const html = await tossr(template, script, req.url, {})
res.send(html + '\n<!--ssr rendered-->')
}