2
0
mirror of https://github.com/tenrok/vue-meta.git synced 2026-06-18 19:00:34 +03:00

fix: meta content templates (#429)

* examples: add content templates to ssr example

* fix: improve meta content templates

* chore: cleanup debug helper

* refactor: split long if into variables
This commit is contained in:
Pim
2019-08-03 10:44:34 +02:00
committed by GitHub
parent 66d98ee170
commit 6907f9ac98
12 changed files with 188 additions and 73 deletions
+3 -2
View File
@@ -32,11 +32,12 @@ app.use(express.static(__dirname))
app.use(async (req, res, next) => {
if (!req.url.startsWith('/ssr')) {
next()
return next()
}
try {
const html = await renderPage()
const context = { url: req.url }
const html = await renderPage(context)
res.send(html)
} catch (e) {
consola.error('SSR Oops:', e)