chore: readme

This commit is contained in:
Evan You
2020-02-18 14:56:18 -05:00
parent c3028ad6b3
commit 8f463b3859
2 changed files with 23 additions and 2 deletions

View File

@@ -1 +1,16 @@
# @vue/server-renderer
``` js
const { createSSRApp } = require('vue')
const { renderToString } = require('@vue/server-renderer')
const app = createSSRApp({
data: () => ({ msg: 'hello' }),
template: `<div>{{ msg }}</div>`
})
;(async () => {
const html = await renderToString(app)
console.log(html)
})()
```